Worker tasks are registered per app
CI / validate-monitoring (push) Successful in 8s
CI / lint (push) Successful in 10s
CI / test (push) Successful in 1m46s
CI / images (push) Skipped
CI / assets (push) Skipped
CI / python-package (push) Skipped
CI / notify (push) Successful in 5s
CI / validate-monitoring (push) Successful in 8s
CI / lint (push) Successful in 10s
CI / test (push) Successful in 1m46s
CI / images (push) Skipped
CI / assets (push) Skipped
CI / python-package (push) Skipped
CI / notify (push) Successful in 5s
The task registry was module-global, so tasks registered by an app with federation enabled would also run under an app without it (and break the "federation off registers nothing" guarantee depending on order). Tasks now live on each app (app.extensions["worker_tasks"]); register_task/register_periodic take the app, and the worker runs the current app's tasks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MK52BGoJbPhZ1vSFuKcGUW
This commit is contained in:
1 parent
d49aa72be1
commit
c1a7dd0877
5 files changed
+56
-25
No files matched your search
@@ -46,7 +46,7 @@ def create_app(config_object=None):
|
||||
|
||||
app.cli.add_command(worker_command)
|
||||
app.cli.add_command(imports_cli)
|
||||
import_service.register_worker_tasks()
|
||||
import_service.register_worker_tasks(app)
|
||||
|
||||
from scrobbler.metrics import db as db_metrics
|
||||
|
||||
|
||||
Reference in new issue
Block a user