Monkey#
- class mobu.services.monkey.Monkey(*, name, flock=None, business_config, user, http_client, events, repo_manager, logger)#
Bases:
object
Runs one business and manages its log and configuration.
- Parameters:
name (
str
) – Name of this monkey.flock (
str
|None
, default:None
) – Name of the flock this monkey belongs to, orNone
if it is running as a solitary.business_config (
BusinessConfig
) – Configuration for the business it should run.user (
AuthenticatedUser
) – User the monkey should run as.http_client (
AsyncClient
) – Shared HTTP client.events (
Events
) – Event publishers.repo_manager (
RepoManager
) – For efficiently cloning git repos.logger (
BoundLogger
) – Global logger.
Methods Summary
alert
(exc)Send an exception to Sentry.
dump
()Return information about a running monkey.
logfile
()Get the log file for a monkey's log.
run_once
()Run the monkey business once.
Tell the business to refresh.
start
(scheduler)Start the monkey.
stop
()Stop the monkey.
Methods Documentation
- async alert(exc)#
Send an exception to Sentry.
- dump()#
Return information about a running monkey.
- Return type:
- async run_once()#
Run the monkey business once.