faust.agents.manager

Agent manager.

class faust.agents.manager.AgentManager(app: AppT, **kwargs: Any)[source]

Agent manager.

traceback_header: str = '\n=======================================\n TRACEBACK OF ALL RUNNING AGENT ACTORS\n=======================================\n'
traceback_format: str = '\n* {name} ----->\n============================================================\n{traceback}\n\n'
app: _AppT
data: MutableMapping[KT, VT]
async on_start() None[source]

Call when agents are being started.

Return type:

None

actor_tracebacks() Mapping[str, List[str]][source]
Return type:

_GenericAlias[str, _GenericAlias[str]]

human_tracebacks() str[source]
Return type:

str

async wait_until_agents_started() None[source]
Return type:

None

service_reset() None[source]

Reset service state on restart.

Return type:

None

async on_stop() None[source]

Call when agents are being stopped.

Return type:

None

async stop() None[source]

Stop all running agents.

Return type:

None

cancel() None[source]

Cancel all running agents.

Return type:

None

update_topic_index() None[source]

Update indices.

Return type:

None

async on_rebalance(revoked: Set[TP], newly_assigned: Set[TP]) None[source]

Call when a rebalance is needed.

Return type:

None

logger: logging.Logger = <Logger faust.agents.manager (WARNING)>
log: CompositeLogger
diag: DiagT
async_exit_stack: AsyncExitStack
exit_stack: ExitStack