Unknown celery jobs fail mostly silently

RESOLVED FIXED in 6.2.7

Status

addons.mozilla.org Graveyard
Code Quality
RESOLVED FIXED
6 years ago
2 years ago

People

(Reporter: clouserw, Assigned: robhudson)

Tracking

unspecified
6.2.7

Details

(Reporter)

Description

6 years ago
Celeryd imports tasks.py from each project.  If that tasks.py happens to import other files (like cron.py) then tasks that exist in cron will work fine.  If they don't import other files like cron then celeryd won't know about the tasks and won't run them.  These 3 jobs are failing because celery doesn't know about them:

NotRegistered: 'apps.addons.tasks.delete_preview_files'
NotRegistered: 'devhub.responsys.subscribe'
NotRegistered: 'users.cron._update_user_ratings'
I think if you just add routes for each task then they will always get imported https://github.com/jbalogh/zamboni/blob/master/settings.py#L880

It would probably be nice to log or raise an exception or something when these are not set up right though
(Assignee)

Comment 2

6 years ago
I thought it clarified things to keep tasks in the tasks.py file, and the actual cron entry points in the cron.py.  That's the fix I committed for the user ratings, and the fix I have on my branch for the responsys.subscribe.  The delete_preview_files seems like it's registered by celery already so that might be something else.
(Assignee)

Comment 3

6 years ago
update user ratings fixed in https://github.com/jbalogh/zamboni/commit/6d1fbf4

subscribe responsys fixed in https://github.com/jbalogh/zamboni/commit/bfd2e2a
(Assignee)

Comment 4

6 years ago
Verified that 'apps.addons.tasks.delete_preview_files' is working... saw logs in the app logs.
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.