prozorro_sale.tools.application_worker moduleΒΆ

class prozorro_sale.tools.application_worker.ApplicationWorker(handle_signals: bool = False, loop: Optional[asyncio.events.AbstractEventLoop] = None)[source]

Bases: object

__call__() Coroutine[source]

gunicorn compatibility

__cleanup_ctx
__delitem__(key: str) None[source]
async __destroy_woker()
__eq__(other: object) bool[source]

Return self==value.

__frozen
__getattr__(name)[source]
__getitem__(key: str) Any[source]
__handle_signals
__hash__ = None
__init__(handle_signals: bool = False, loop: Optional[asyncio.events.AbstractEventLoop] = None) None[source]
__iter__() Iterator[str][source]
__len__() int[source]
__loop
async __make_worker()
__on_cleanup
__on_shutdown
__on_startup
__pre_frozen
__process
__repr__() str[source]

Return repr(self).

__running
__setattr__(key: str, value: Any) None[source]

Implement setattr(self, name, value).

__setitem__(key: str, value: Any) None[source]
__slots__ = ('__handle_signals', '__state', '__frozen', '__pre_frozen', '__on_startup', '__on_shutdown', '__on_cleanup', '__cleanup_ctx', '__process', '__running', '__tasks', '__loop')
__state
__task_runer()
__tasks
add_process(process)[source]
async cleanup() None[source]

Causes on_cleanup signal

Should be called after shutdown()

property cleanup_ctx: aiohttp.web_app.CleanupContext
freeze() None[source]
property frozen: bool
property loop
property on_cleanup: aiosignal.Signal
property on_shutdown: aiosignal.Signal
property on_startup: aiosignal.Signal
pre_freeze() None[source]
property pre_frozen: bool
async run()[source]
property running
async shutdown() None[source]

Causes on_shutdown signal

Should be called before cleanup()

async startup() None[source]

Causes on_startup signal

Should be called in the event loop along with the request handler.

stop(*args, with_raise=False, **kwargs)[source]
exception prozorro_sale.tools.application_worker.ApplicationWorkerTasksErrors[source]

Bases: Exception