Worker Architecture
Workers
| Worker | Schedule | Purpose |
|---|---|---|
| Invoice Generator | Every hour at :00 | Create DRAFT invoices for due subscriptions |
| Invoice Finalizer | Every 5 minutes | Finalize DRAFT invoices → OPEN, send emails |
| Startup Catchup | On server start | Process any missed invoices during downtime |
Startup Behavior
When the server starts, it immediately runs the invoice generator to catch any subscriptions that became due while the server was offline. This ensures no billing gaps due to downtime.Worker Monitoring
Check worker health:Worker Status Values
| Status | Meaning |
|---|---|
healthy | Working normally |
warning | 1-2 recent failures |
critical | 3+ consecutive failures |
stale | No runs in >2 hours |
unknown | Never run |
Invoice Generation
How subscriptions are processed and invoices created
Invoice Finalization
How draft invoices become open and get emailed