Skip to main content

drain_requested

Method
This is a method of the DrainMarkerPolicy class in the protocols module.
Return whether marker is a live drain request for this instance.

Signature

Parameters

Optional
required
Parsed marker contents, or None when no marker file is present.
str
required
The current instantiation epoch (see :func:current_epoch).
float
required
A monotonic timestamp (unused by the default policy; accepted so subclasses can implement TTL/debounce without changing the call site).

Returns

bool
True only for a non-stale, current-epoch drain request that has not already been handled.

Source

View on GitHub

praisonaiagents/gateway/protocols.py at line 4055