> ## Documentation Index
> Fetch the complete documentation index at: https://surf-dcinside-api.kr.ask.surf/llms.txt
> Use this file to discover all available pages before exploring further.

# Calling from the DCinside Worker

> Transport helper, deadline configuration and recovery during rehearsal

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.

```python theme={null}
from rtb_api.client import RTBClient

# Supply these from the integration configuration agreed by both teams.
client = RTBClient(
    base_url=rehearsal_base_url,
    api_key=secret_manager.get("RTB_API_KEY"),
    timeout_s=agreed_response_timeout_s,
    max_retries=0,
)

response = client.post_cycle(cycle_payload)
# The worker checks the deadline, cycle identity and freshness before
# logging would-be picks. It does not publish during rehearsal.
for row in response["results"]:
    score = row.get("score") if row["status"] == "scored" else None

# When receipt is uncertain, recovery is separate from the decision deadline.
recovered = client.get_scores(cycle_payload["cycle_id"])
```

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](/conventions#retries-and-recovery) for the proposed replay protocol and current restart limitations.
