Git Product home page Git Product logo

Comments (7)

rwojsznis avatar rwojsznis commented on June 5, 2024 1

Hey there! Thank you for feedback and suggestion; this gem was never designed to be used with ActiveJob, but I will look into your approach and get back to you after next week+! (Currently traveling without a laptop)

from sidekiq-lock.

rwojsznis avatar rwojsznis commented on June 5, 2024 1

Sorry for the lag, got back this week!

Did some quick research:

  • as per Sidekiq 6.0 you can use sidekiq_options directly; reference

  • seems we could use this for obtaining options then

Hmm, so the clean solution would be basically to require at least sidekiq 6.x and do some internal changes so we could support ActiveJob as well seamlessly 🤔 that's a pretty aggressive change tho - I will need to check what's the expected support for Sidekiq 5.x (like in terms of bugfixes) - I can only guess, but I think a lot of people could still use it

from sidekiq-lock.

xxx avatar xxx commented on June 5, 2024

Yeah, we're using 6.whatever right now, so I'm just putting sidekiq_options in the job, as if it were a plain Sidekiq worker. That part works the exact same as Workers.

The only part that didn't work before was actually accessing those options from the middleware.

from sidekiq-lock.

rwojsznis avatar rwojsznis commented on June 5, 2024

Maybe we could just do a version check inside the middleware itself and use sidekiq_options_hash if version 6 is being used - simply for backward compatibility 🤔 such check shouldn't have too much of an performance impact (micro might be benchmark needed, also I totally forgot when middleware is being initialized - maybe we could do the version check once)

@xxx thanks for bringing that up in the first place! I will try to suggest some solution within this month (hopefully)

from sidekiq-lock.

yrashk avatar yrashk commented on June 5, 2024

I am also interested in exploring the ability to have this working with ActiveJob. Anything I can help with?

from sidekiq-lock.

rwojsznis avatar rwojsznis commented on June 5, 2024

@yrashk hello 👋 I'm kinda swamped with other work atm, if you have time to help that would be great! (the more contributors the merrier)

Let's maybe first prep failing test suite (so using lock inside ActveJob job, not sure what effort we're talking about here tbh 🙈 ) and take it from there - I think we quickly can agree on reasonable implementation that won't break backward compatibility, does that sounds good?

from sidekiq-lock.

rwojsznis avatar rwojsznis commented on June 5, 2024

Closing this due to lack of interest; maybe I will try to revisit it in next month or two but no promises 🙈

from sidekiq-lock.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.