Closed fabiengagne closed 1 year ago
Disregard this PR. I now understand that this is the actual expected result. Idempotent keys does not make jobs with two identical keys execute serially (one after the other), it make them execute only the first time. I misunderstood the goal of this package.
Using a Custom Idempotent Key and an iterable step (using a for_each:), results in the job queue not running any jobs after the first job is completed. The AcidicJob will only run the first job, including all its steps, but all others jobs enqueued after this are only initialized but never run. In effect, this Custom Indempotent queue is stuck.
Sample code :
Then do dist_server.api_key = "abcdef" MyJob.perform_later(dist_server) sleep 2 MyJob.perform_later(dist_server)
Result step1 is displayed 5 times, followed by step2 (the second job is never executed)
Expected result step1 is displayed 5 times, followed by step2 step1 is displayed 5 times, followed by step2