MCPcopy Create free account
hub / github.com/StackStorm/st2 / deregister_service

Function deregister_service

st2common/st2common/service_setup.py:347–363  ·  view source on GitHub ↗
(service, start_heart=True)

Source from the content-addressed store, hash-verified

345
346
347def deregister_service(service, start_heart=True):
348
349 if not isinstance(service, six.binary_type):
350 group_id = service.encode("utf-8")
351 else:
352 group_id = service
353
354 coordinator = coordination.get_coordinator(start_heart=start_heart)
355
356 member_id = coordination.get_member_id()
357 LOG.debug(
358 'Leaving service registry group "%s" as member_id "%s"' % (group_id, member_id)
359 )
360 try:
361 coordinator.leave_group(group_id).get()
362 except (GroupNotCreated, MemberNotJoined):
363 pass

Callers 12

mainFunction · 0.90
mainFunction · 0.90
_run_workerFunction · 0.90
_run_workerFunction · 0.90
_run_workerFunction · 0.90
_run_schedulerFunction · 0.90
run_serverFunction · 0.90
_run_workerFunction · 0.90
mainFunction · 0.90
mainFunction · 0.90
queue_shutdownFunction · 0.90
mainFunction · 0.90

Calls 2

leave_groupMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected