Skip to main content
The worker owns candidate delivery and would-be-pick logging. Use the cadence and response deadline agreed for rehearsal. Five-minute cycles are proposed; the response deadline is still open. The repository includes rtb_api.client.RTBClient. It gzip-compresses cycle payloads, sends the key as the whole Authorization header and retries network errors plus 408, 429, 500, 502, 503 and 504. It preserves the request ID and body. Its default timeout is 60 seconds per attempt. That default is not an agreed deadline, and retries can extend total elapsed time beyond one attempt. Configure a total decision deadline in the worker. The example disables automatic retries so the worker can budget recovery separately.
Treat this as a transport example, not a complete worker. It does not implement freshness checks, reconciliation, durable delivery or would-be-pick selection. A recovered late score stays late for its original decision cycle. Keep secrets out of payload files and logs. Keep unacknowledged data until receipt has been established. Read Conventions for the proposed replay protocol and current restart limitations.