Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Celery tasks should use return Task.replace instead of raise Task.replace #2314

Open
pt2302 opened this issue Sep 23, 2024 · 0 comments
Open
Assignees

Comments

@pt2302
Copy link
Contributor

pt2302 commented Sep 23, 2024

Description/Context

Similarly to #2312, recent versions of Celery require return Task.replace whereas previously raise Task.replace was preferred.

For context, compare
https://docs.celeryq.dev/en/3.0/reference/celery.app.task.html?highlight=raise%20self.replace#celery.app.task.Task.replace
and
https://docs.celeryq.dev/en/stable/reference/celery.app.task.html#celery.app.task.Task.replace

Plan/Design

Update any tasks that use raise Task.replace, which includes the following tasks:
https://github.com/mitodl/ocw-studio/blob/master/content_sync/tasks.py
https://github.com/mitodl/ocw-studio/blob/master/ocw_import/tasks.py
https://github.com/mitodl/ocw-studio/blob/master/gdrive_sync/tasks.py
https://github.com/mitodl/ocw-studio/blob/master/videos/tasks.py

@pt2302 pt2302 self-assigned this Sep 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant