Migrating from Celery¶
This guide maps Celery concepts to their taskito equivalents. If you're coming from Celery, you'll find that most concepts translate directly — with less infrastructure and simpler configuration.
Concept Mapping¶
| Celery | taskito | Notes |
|---|---|---|
Celery() app |
Queue() |
No broker URL needed |
@app.task |
@queue.task() |
Same decorator pattern |
.apply_async() |
.apply_async() |
Same name, similar API |
.delay() |
.delay() |
Identical |
AsyncResult |
JobResult |
.result() instead of .get() |
Canvas (chain, group, chord) |
chain, group, chord |
Same names, same concepts |
celery beat |
@queue.periodic() |
Built-in, no separate process |
| Result backend (Redis/DB) | Built-in (SQLite) | No configuration needed |
| Broker (Redis/RabbitMQ) | Not needed | SQLite handles everything |
celery worker |
taskito worker |
Similar CLI |
celery inspect |
taskito info |
Similar CLI |
Side-by-Side Examples¶
App Setup¶
Task Definition¶
Automatic retries
In Celery, you must explicitly catch exceptions and call self.retry(). In taskito, any unhandled exception triggers a retry automatically (up to max_retries).
Enqueueing Tasks¶
The only change: countdown becomes delay.
Getting Results¶
Key differences:
- .get() becomes .result()
- Status values are lowercase
- "SUCCESS" becomes "complete"
Workflows (Canvas)¶
Almost identical. The only change: .apply_async() becomes .apply().
Periodic Tasks¶
Tip
taskito uses 6-field cron expressions (with seconds). Celery's crontab() maps to the last 5 fields, with 0 prepended for seconds.
Celery crontab() |
taskito cron |
|---|---|
crontab() (every minute) |
0 * * * * * |
crontab(minute=0) (every hour) |
0 0 * * * * |
crontab(minute=0, hour=0) (daily) |
0 0 0 * * * |
crontab(minute=30, hour=9, day_of_week='1-5') |
0 30 9 * * 1-5 |
Rate Limiting¶
Identical syntax.
Worker¶
Testing¶
taskito's test mode uses a context manager instead of a global setting, so it's safe to use in parallel test runs.
What taskito Doesn't Have¶
Some Celery features don't have taskito equivalents:
| Celery Feature | Status in taskito |
|---|---|
| Distributed workers (multi-server) | Not supported — single-process only |
| Message routing (exchanges, topics) | Use named queues instead |
celery multi (process management) |
Use systemd, supervisor, or Docker |
| Custom serializers (JSON, msgpack) | JsonSerializer, CloudpickleSerializer (default), or custom Serializer protocol |
| Task cancellation (mid-execution) | Cancel pending or running jobs (cancel_running_job() + check_cancelled()) |
| ETA (absolute datetime scheduling) | Use delay (relative seconds) |
bind=True (self argument) |
Use current_job context instead |
| Custom result backends | Built-in SQLite only |
Migration Checklist¶
- Replace
Celery()withQueue() - Change
@app.taskto@queue.task() - Remove
self.retry()calls — retries are automatic - Change
.get()to.result()on job results - Change
countdown=todelay=in.apply_async() - Replace celery beat schedule with
@queue.periodic() - Update cron expressions to 6-field format (prepend seconds)
- Remove broker and result backend configuration
- Change
celery workertotaskito workerin deployment scripts - Replace
task_always_eagerwithqueue.test_mode()in tests