Code Monkey home page Code Monkey logo

Comments (5)

mishina2228 avatar mishina2228 commented on May 23, 2024 1

I'm using Resque.working and Resque::Worker#job to check running jobs.
I didn't know about resque-loner. Thanks for sharing! @PatrickTulskie

from resque.

mishina2228 avatar mishina2228 commented on May 23, 2024

Hi, I believe this is the problem with resque-workers-lock gem.

https://github.com/bartolsthoorn/resque-workers-lock/blob/eca2db692d80880b646127deeed60c1607ed7837/lib/resque/plugins/workers/lock.rb#L62

if Resque.redis.msetnx lock_result.zip([true]*lock_result.size).flatten

In redis-rb v5, it's no longer possible to pass Boolean values. A String must be passed instead.
Please refer to the following comments:

from resque.

mikebewell avatar mikebewell commented on May 23, 2024

Hello @mishina2228, thank you very much for the response. Do you know if Resque provides functions to check whether the job is already running? If it does, then I could exclude the resque-workers-lock gem.

from resque.

PatrickTulskie avatar PatrickTulskie commented on May 23, 2024

I don't think there is anything natively built in for that. You can use https://github.com/resque/resque-loner to prevent multiple insertions of the same job though. Typically I do state tracking in our relational databases and abort the job if it's marked in progress by something else though.

from resque.

mikebewell avatar mikebewell commented on May 23, 2024

Thank you for your responses. I am closing the issue as it is caused by another gem.

from resque.

Related Issues (20)

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.