- class cobald.daemon.runners.base_runner.BaseRunner(asyncio_loop: AbstractEventLoop)
Concurrency backend on top of asyncio
- abstract async aclose()
Shut down this runner
- abstract async manage_payloads()
Implementation of managing payloads when
This method must continuously execute payloads sent to the runner. It may only return when
stop()is called or if any orphaned payload return or raise. In the latter case,
OrphanedReturnor the raised exception must re-raised by this method.
- async ready()
Wait until the runner is ready to accept payloads
- abstract register_payload(payload)
payloadfor background execution in a threadsafe manner
payloadas an orphaned background task as soon as possible. It is an error for
payloadto return or raise anything without handling it.
- async run()
Execute all current and future payloads in an asyncio coroutine
This method will continuously execute payloads sent to the runner. It only returns when
stop()is called or if any orphaned payload returns or raises. In the latter case,
OrphanedReturnor the raised exception is re-raised by this method.
Implementations should override
manage_payloads()to customize their specific parts.
- abstract run_payload(payload)
payloadand return its result in a threadsafe manner
payloadas soon as possible, blocking until completion. Should
payloadreturn or raise anything, it is propagated to the caller.
Stop execution of all current and future payloads and block until success