Closed danishsatkut closed 9 months ago
So after playing around with different refs of the gem, I think the issue started somewhere after e5ac585. At that version, I wasn't seeing any duplication but the concurrency issue was still the same as I had encountered before. https://gist.github.com/danishsatkut/1c43401588f45368569499c3eae2982b
BTW I also downgraded sidekiq to v7.1.1
My team is using version 0.17.0, and we're seeing duplicate jobs as well.
@emmahsax Which version of sidekiq are you using?
0.17.0. But I realized I didn't finish the docs. The README says the default lock is for 15 minutes, and that wasn't enough for our jobs. This is what I get for working at 5:30 in the morning 🤦🏼♀️ .
That's weird. Will debug.
the same issue here, alpha seems not doing any concurrency management/throttling with the setup similar to the topic starter's one.
I have refactored the way BasicFetch is get patched. Should be good in >= v.1.0.0
This is the script I used to check:
require "sidekiq"
require "sidekiq/throttled"
puts "Sidekiq::VERSION => #{Sidekiq::VERSION}"
puts "Sidekiq::Throttled::VERSION => #{Sidekiq::Throttled::VERSION}"
Sidekiq::Throttled.setup!
class SampleJob
include Sidekiq::Job
include Sidekiq::Throttled::Job
sidekiq_throttle concurrency: { limit: 1 }
def perform(id)
puts "Processing ##{id}"
sleep(10)
puts "Done ##{id}"
end
end
100.times { SampleJob.perform_async(_1.succ) }
@ixti I will test and confirm if it works. Thank you for your efforts.
@ixti I have tested and can confirm the issue is resolved after upgrading to v1.0.1
(https://github.com/ixti/sidekiq-throttled/pull/166)
@danishsatkut thank you!
I have been trying to get sidekiq-throttled (
v1.0.0.alpha.1
) to work with a new project (Rails v7.0.6 and Sidekiq v7.1.2) but I have been running into issues. When the sidekiq processing starts, the concurrency config is not respected. Once the first batch of 5 jobs (default sidekiq concurrency) are finished, the concurrency config starts working, but now it results in duplicate jobs (similar to #152).I have attached the
SampleJob
and sidekiq.log which demonstrates the issue here: https://gist.github.com/danishsatkut/6a11d06eae2f7b464d285002856ba9b5