Celery App
The Celery app provides async task infrastructure for distributed computation, including custom wrappers that improve on native Celery functionality.Overview
Celery handles expensive operations asynchronously:- Financial calculations (waterfalls, XIRR)
- PDF generation
- Event processing
- Background data updates
Custom Wrappers
Maybern wraps Celery for several reasons:Clarity
Simpler API than native Celery.
Performance
Store task data in Redis, not the queue.
Flexibility
Easier to switch task queue libraries.
Observability
Consistent logging and error handling.
Task Definition
Queue Configuration
| Queue | Use For |
|---|---|
DEFAULT | General tasks |
CORE_COMPUTATION | Financial calculations |
CORE_COMPUTATION_HIGH_PRIORITY | User-initiated calculations |
NOTICES | PDF generation |
Dynamic Queue Routing
Tasks automatically route to priority queues based on request source:Sync Workflows
For multi-stage sequential workflows:Running Locally
Debugging
See Troubleshooting for:- Worker not picking up changes
- Remote debugging with rdb
- Redis inspection