current_attempt_number
functiongworker_client.io.current_attempt_number
Return the retry attempt number for the current invocation, starting at 1. Use inside a task body to implement attempt-aware logic (e.g. skip expensive setup on retries).
Signature
python
1current_attempt_number() -> int