What problem would this feature solve? ====================================== The kuma.wiki.tasks.send_first_edit_email task is called when a user creates their first edit. However, the transaction that creates the revision may still be open when the task is scheduled. Who has this problem? ===================== Staff contributors to MDN How do you know that the users identified above have this problem? ================================================================== The transaction_task decorator from django_celery_transactions is being used to delay dispatching the task until the transaction is complete. However, django_celery_transactions is deprecated and may not work with future versions of Django How are the users identified above solving this problem now? ============================================================ The decorator works with Django 1.8, the current version used in production Do you have any suggestions for solving the problem? Please explain in detail. ============================================================================== If the revision is not available when the task is called, retry after a delay to give the transaction a chance to complete. Is there anything else we should know? ====================================== This strategy is used in the tidy_revision_content task in the same file.
Celery 4.x recommends using Django 1.9's transaction.on_commit: http://docs.celeryproject.org/en/latest/whatsnew-4.0.html#django-support This may avoid the issue with running the task before the user is created.
You need to log in before you can comment on or make changes to this bug.