Document race condition.

parent 224491aa
......@@ -39,6 +39,8 @@ class Job(models.Model):
# publish original task which stores the result in this Job object
result_id = (task | cls.store_result.s(job_id=job.id)).apply_async(*args, **kwargs)
# retrieve job object again (might have changed if celery was really fast or eager was enabled)
job = Job.objects.get(id=job.id)
job.result_id = result_id.id
job.save()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment