Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: middleware not finalizing correctly when job is ActiveJob #151

Merged
merged 1 commit into from
Aug 12, 2023
Merged

fix: middleware not finalizing correctly when job is ActiveJob #151

merged 1 commit into from
Aug 12, 2023

Conversation

malavbhavsar
Copy link
Contributor

@malavbhavsar malavbhavsar commented Jul 26, 2023

I noticed this when I was using concurrency with ActiveJob. For the example below, only 2 instances of ExampleJob would process and not clear the lock.

class ApplicationJob < ActiveJob::Base
  include Sidekiq::Throttled::Job
end

class ExampleJob < ApplicationJob
  sidekiq_throttle(
    concurrency: { limit: 2 },
  )

  def perform
    # do something
  end
end

Digging deeper, this call was missed in earlier changes to support ActiveJob. Fixed that and added tests to prevent regression.

@ixti ixti merged commit dd0f771 into ixti:main Aug 12, 2023
4 of 5 checks passed
@ixti
Copy link
Owner

ixti commented Aug 12, 2023

Thank you!

ixti added a commit that referenced this pull request Aug 12, 2023
@malavbhavsar malavbhavsar deleted the malav/fix-concurrency-strategy-not-working-with-activejob branch August 15, 2023 21:41
@malavbhavsar
Copy link
Contributor Author

🙏 thanks @ixti. No rush but any timeline for the next version bump? So I can remove this monkey patch from our application.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants