Skip to main content

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

NameTypeDescription
objobjectThe worker instance responsible for task handling, pool management, and event loop registration.
connectionobjectThe message broker connection object used for communication and error tracking.
consumerobjectThe message consumer instance that receives tasks from the broker.
blueprintobjectThe execution blueprint containing the current runtime state of the worker.
hubobjectThe event loop hub that manages file descriptors, timers, and I/O events.
qosobjectThe Quality of Service manager used to control message prefetching and flow limits.
heartbeatobjectThe heartbeat configuration or handler for maintaining the broker connection.
clockobjectThe clock instance used for timing and scheduling events within the hub.
hbratefloat = 2.0The frequency rate at which AMQP heartbeats are sent to the broker.

Returns

TypeDescription
nullThis function does not return a value; it runs until the loop is terminated or an exception is raised.