collectiveidea / delayed_job

Database based asynchronous priority queue system -- Extracted from Shopify
http://groups.google.com/group/delayed_job
MIT License
4.81k stars 955 forks source link

Delayed Job records are getting duplicated in production rails app #1199

Closed seenivasang123 closed 6 months ago

seenivasang123 commented 6 months ago

We are using delayed job to enqueue the background jobs in our rails application with (rails 5.2.5, ruby 2.6.3). We hosted application through Cloud 66 in this at the time of worker server down (delayed job process server) due to DeadLock and already queued delayed job record are getting duplicated. Based on the delayed job documentation there is no possibility for record duplication. Please share some possibilities for this type of issue.

Example,

Main job with handler like, ( "--- !ruby/object:Delayed::PerformableMethod\nobject: !ruby/class 'SendNotificationJob'\nmethod_name: :perform_now\nargs:\n- 11111\n ")

After server down duplicated jobs (around 1000 jobs) created with above same handler details and time.

albus522 commented 6 months ago

There is nothing within DJ that creates jobs. Jobs are entirely created by your application.