Skip to content

Commit 28da9b2

Browse files
snopokeclaude
andcommitted
Document the Celery tracking opt-out
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent f9495d0 commit 28da9b2

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,3 +125,18 @@ def slow_job():
125125

126126
Unless `stale_timeout` is given explicitly it is set to twice the interval. All running tasks are
127127
pinged from a single background thread, started the first time a task with a heartbeat runs.
128+
129+
### Skipping tracking for a single Celery call
130+
131+
Pass `taskbadger_track=False` to leave one execution untracked. This overrides auto-tracking as
132+
well as the `taskbadger.Task` base class:
133+
134+
```python
135+
noisy_job.apply_async(args, taskbadger_track=False)
136+
```
137+
138+
Canvas primitives don't go through `apply_async` on the task itself, so pass it in the headers:
139+
140+
```python
141+
noisy_job.map(items).apply_async(headers={"taskbadger_track": False})
142+
```

0 commit comments

Comments
 (0)