mistral.service package¶
Submodules¶
mistral.service.base module¶
-
class
mistral.service.base.
MistralService
(cluster_group, setup_profiler=True)¶ Bases:
oslo_service.service.Service
Base class for Mistral services.
The term ‘service’ here means any Mistral component that can run as an independent process and thus can be registered as a cluster member.
-
start
()¶
-
stop
(graceful=False)¶
-
wait_started
()¶ Wait until the service is fully started.
-
mistral.service.coordination module¶
-
class
mistral.service.coordination.
Service
(group_type)¶ Bases:
object
-
register_membership
(*args, **kwargs)¶ Registers group membership.
Because this method will be invoked on each service startup almost at the same time, so it must be synchronized, in case all the services are started within same process.
-
stop
()¶
-
-
class
mistral.service.coordination.
ServiceCoordinator
(my_id=None)¶ Bases:
object
Service coordinator.
This class uses the tooz library to manage group membership.
To ensure that the other agents know this agent is still alive, the heartbeat method should be called periodically.
-
get_members
(group_id)¶ Gets members of coordination group.
ToozError exception must be handled when this function is invoded, we leave it to the invoker for the handling decision.
-
heartbeat
()¶
-
is_active
()¶
-
join_group
(*args, **kw)¶
-
leave_group
(group_id)¶
-
start
()¶
-
stop
()¶
-