DjangoTask: safe task dispatch after transaction commit
DjangoTask: safe task dispatch after transaction commit: a task in LegoFlow-SWE (Harbor dataset). When using Celery with Django, calling .delay() inside a database transaction can cause the task to start executing before the transaction is committed. This leads to race conditions where the task…
The task
When using Celery with Django, calling `.delay()` inside a database transaction can cause the task to start executing *before* the transaction is committed. This leads to race conditions where the task may read stale or missing data.
Part of Lego-X/LegoFlow-SWE.