Kit services workqueue facility

The workqueue facility allows requests to be processed in parallel and in the background. Requests can be submitted using a regular service and be submitted to the work queue. Consumers can then grab tasks from the work queue to process them in a separate thread

The default implementation uses an in memory queue. Using this reference implementation external queueing systems can be added.

Workqueue Facility allows for services to submit tasks to workers to execute requests async chroniously

The Facility allows the same queue to be shared safely across the services and extension.

class omni.services.facilities.workqueue.AsyncLifoWorkQueueFacility

Bases: omni.services.facilities.workqueue.AsyncWorkQueueFacility

class omni.services.facilities.workqueue.AsyncRequestContext(*args, loop=None)

Bases: asyncio.locks.Event

get_result()
set_result(result)
class omni.services.facilities.workqueue.AsyncWorkQueueFacility

Bases: omni.services.facilities.workqueue.BaseWorkQueueFacility

async get() -> (<class 'asyncio.locks.Event'>, typing.Any)
async put(item)omni.services.facilities.workqueue.AsyncRequestContext
async put_nowait(item)omni.services.facilities.workqueue.AsyncRequestContext
class omni.services.facilities.workqueue.BaseWorkQueueFacility(queue_inst=None)

Bases: omni.services.facilities.base.Facility

empty()
get() -> (<class 'threading.Event'>, typing.Any)
get_nowait()
put(item)threading.Event
put_nowait(item)