You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[background_tasks] No hook for a consumer module to register a beat schedule; docs imply one, and the commonly-cited on_after_configure signal doesn't fire under build_celery #199
A consumer module can autodiscover tasks (ship tasks.py) but cannot register a periodic/beat schedule through any framework hook, and the obvious Celery approach is broken in this setup.
Environment
Framework checkout: v0.0.17-5-g2b079c9; smpy / published simple_module_* / @simple-module-py/*: 0.0.17
Python 3.12.3, uv 0.11.7, node v24.15.0, Linux (Ubuntu)
Found while building a real consumer app (Invoice Manager) on the framework.
Details
docs/modules/background_tasks.md implies make beat runs "beat schedules other modules add", but beat_schedule is a hardcoded dict in build_celery (celery_app.py) with the two internal tasks and no consumer registry/hook. No module adds entries.
The commonly-cited from celery.signals import on_after_configure does not work: on_after_configure is an app-instance signal (not a member of celery.signals → ImportError), and build_celery calls conf.update(...) (which fires it) beforeautodiscover_tasks(...) imports the module's tasks.py — so even connecting to the right object misses the already-fired signal.
Verified: the entry lands in beat_schedule (0 6 * * *) alongside the built-ins.
Impact
Recurring features need this. Suggest either a first-class "register periodic task" hook for modules, or documenting the on_after_finalize pattern in background_tasks.md (and not on_after_configure).
Activity
Resolve GH #199, #200, #203, #206 (background_tasks beat, test fixtur…
antosubash commentedon Jun 16, 2026
Resolved in #209 (released in v0.0.19) — modules register periodic work via a module-level BEAT_SCHEDULE dict in tasks.py, merged in build_celery.