Purge
Delete old interactions on a schedule
Workers are periodic background jobs that run inside the xodbox process on a configurable schedule. They are the complement to Notifiers: notifiers react to inbound events in real time; workers run independently of traffic and operate on the captured data (pruning old records, aggregating stats, etc.).
Workers are registered in xodbox.yaml under a top-level workers: key,
following the same key: value map convention used by handlers and notifiers.
The schedule key accepts any robfig/cron v3
expression:
| Expression | Meaning |
|---|---|
@daily | Once a day at midnight |
@hourly | Once an hour |
@every 30m | Every 30 minutes |
@every 6h | Every 6 hours |
0 2 * * * | Standard 5-field cron (daily at 02:00) |
*/15 * * * * | Every 15 minutes |
Run and waits for any in-flight run to complete
before exiting.workers:
## Docs: https://defektive.github.io/xodbox/docs/pkg/workers/purge/
- worker: purge
schedule: "@daily"
max_age_days: "30"
| Worker | Description |
|---|---|
purge | Delete interactions older than N days |
Delete old interactions on a schedule