silverback.runner
The silverback.runner
module contains implementations for running Silverback apps in a variety
of different scenarios and trigger methods.
- class silverback.runner.BaseRunner(bot: SilverbackBot, *args, max_exceptions: int = 3, recorder: BaseRecorder | None = None, **kwargs)
Bases:
ABC
- async run()
Run the task broker client for the assembled
SilverbackBot
bot.Will listen for events against the connected provider (using ManagerAccessMixin context), and process them by kicking events over to the configured broker.
- Raises:
StartupFailure – If there was an exception during startup.
NoTasksAvailableError – If there are no configured tasks to execute.
- class silverback.runner.PollingRunner(bot: SilverbackBot, *args, **kwargs)
Bases:
BaseRunner
,ManagerAccessMixin
Run a single bot against a live network using a basic in-memory queue.
- class silverback.runner.WebsocketRunner(bot: SilverbackBot, *args, **kwargs)
Bases:
BaseRunner
,ManagerAccessMixin
Run a single bot against a live network using a basic in-memory queue and websockets.
- async run()
Run the task broker client for the assembled
SilverbackBot
bot.Will listen for events against the connected provider (using ManagerAccessMixin context), and process them by kicking events over to the configured broker.
- Raises:
StartupFailure – If there was an exception during startup.
NoTasksAvailableError – If there are no configured tasks to execute.