asynloop
Non-blocking event loop.
def asynloop(
obj: object,
connection: object,
consumer: object,
blueprint: object,
hub: object,
qos: object,
heartbeat: object,
clock: object,
hbrate: float = 2.0
) - > null
Non-blocking event loop. This function initializes the worker components, registers them with the event hub, and executes a continuous loop to process incoming messages and manage heartbeats until the worker is shut down or the connection is lost.
Parameters
| Name | Type | Description |
|---|---|---|
| obj | object | The worker instance responsible for task handling, pool management, and event loop registration. |
| connection | object | The message broker connection object used for communication and error tracking. |
| consumer | object | The message consumer instance that receives tasks from the broker. |
| blueprint | object | The execution blueprint containing the current runtime state of the worker. |
| hub | object | The event loop hub that manages file descriptors, timers, and I/O events. |
| qos | object | The Quality of Service manager used to control message prefetching and flow limits. |
| heartbeat | object | The heartbeat configuration or handler for maintaining the broker connection. |
| clock | object | The clock instance used for timing and scheduling events within the hub. |
| hbrate | float = 2.0 | The frequency rate at which AMQP heartbeats are sent to the broker. |
Returns
| Type | Description |
|---|---|
null | This function does not return a value; it runs until the loop is terminated or an exception is raised. |