Skip to content

Fix unregistered celery tasks - #510

Merged
OmarIthawi merged 2 commits into
appsembler/tahoe/developfrom
omar/celery-tasks
Dec 30, 2019
Merged

Fix unregistered celery tasks#510
OmarIthawi merged 2 commits into
appsembler/tahoe/developfrom
omar/celery-tasks

Conversation

@OmarIthawi

@OmarIthawi OmarIthawi commented Dec 30, 2019

Copy link
Copy Markdown

As pointed out by Anders in #508. Celery tasks failure is one of the most annoying noise in our logs. This should fix the issue. I've cherry picked both https://github.com/edx/edx-platform/pull/21297 and https://github.com/edx/edx-platform/pull/21305 from upstream.

Fixes RED-437.
Closes #508.

Fix Unregistered Task

openedx.core.djangoapps.bookmarks.tasks.update_xblock_cache task is not
getting autodiscovered by celery and needs to be imported explicitly

PROD-284
openedx.core.djangoapps.ccxcon.tasks.update_ccxcon is not get auto
discovered by celery. Adding it to CELERY_IMPORTS to be explicitly
added.

PROD-283
Comment thread cms/envs/common.py
CELERY_IMPORTS = (
'cms.djangoapps.contentstore.tasks',
'openedx.core.djangoapps.bookmarks.tasks',
'openedx.core.djangoapps.ccxcon.tasks',

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to be clear: We register the tasks module here and then register the specific function within the tasks module with the @task decorator?

@OmarIthawi OmarIthawi Dec 30, 2019

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess so @johnbaldwin! I'm honestly not super sure why it's not being called but I'd like to cherry pick those issues first as they'll come from upstream later on anyway.

I think this will fix the issue. If it doesn't fix our issue, we'll use another fix like #508 later on.

@OmarIthawi
OmarIthawi merged commit 2c5a41e into appsembler/tahoe/develop Dec 30, 2019
@OmarIthawi
OmarIthawi deleted the omar/celery-tasks branch December 30, 2019 09:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants