Expand description
A thread-safe tracker for counting the number of attempts made by a task.
The Attempt struct wraps an atomic counter, allowing concurrent increment and retrieval of the attempt count. It is designed to be used within the Apalis job/task system, enabling tasks to keep track of how many times they have been retried or executed.
Features:
- Thread-safe increment and retrieval of attempt count.
- Integration with apalis
FromRequesttrait for extracting attempt information from a task context. - Optional (via the
serdefeature) serialization and deserialization support for persisting or transmitting attempt state.
Structsยง
- Attempt
- A wrapper to keep count of the attempts tried by a task