Skip to main content

drain

AsyncMethod
This is a method of the OutboundDeliveryProtocol class in the protocols module.
Process pending messages. Called on startup to retry unsent messages. Messages are processed oldest-first to maintain order.

Signature

Parameters

Callable
required
Async function that attempts delivery. Should return True on success, False to retry later.
Optional[int]
Optional max messages to process

Returns

tuple[int, int]
Tuple of (succeeded, failed) counts

Source

View on GitHub

praisonaiagents/gateway/protocols.py at line 1528