Code Monkey home page Code Monkey logo

Comments (9)

pkmishra avatar pkmishra commented on August 25, 2024

See this - #11. Also we need dequeue method

from jesque.

akandratovich avatar akandratovich commented on August 25, 2024

I think, Jesque should use expire keys for workers and some cleaning up logic.
We can't be sure that application ends in safe way. And now there is no way to clean up wrong data in redis.

from jesque.

gresrun avatar gresrun commented on August 25, 2024

Does Resque have this feature? Do you have a suggestion as to how to make this cleanup happen safely?

from jesque.

akandratovich avatar akandratovich commented on August 25, 2024

Sorry. Resque... Jesque... =)

I'm talking about Jesque. As i understand, worker information is: key and values in some sets.
You can set expire for worker keys and use utility worker thread, that time to time updates expire information on worker keys that are started on current JVM, and cleans information from sets on workers, that are expired (keys not found).

from jesque.

gresrun avatar gresrun commented on August 25, 2024

So, if I understand you, your proposal is to have a separate thread on each worker JVM that updates an exipry key in Redis for each worker in that JVM. Then there is an external reaper process that periodically scans those exipry keys and if a key is stale, the reaper then assumes the corresponding worker's JVM has crashed hard and will cleanup all Redis keys associated with that worker. Is that correct?

Have you had an issue with your JVM's crashing? Have you tried adding a shutdown hook or a signal handler?

from jesque.

akandratovich avatar akandratovich commented on August 25, 2024

Have you had an issue with your JVM's crashing? Have you tried adding a shutdown hook or a signal handler?

Ofc, i use hooks. But they can't give you 100% guarantee =)

from jesque.

gresrun avatar gresrun commented on August 25, 2024

OK, just checking!
Would you be willing to start on this feature and submit a pull request?

from jesque.

gresrun avatar gresrun commented on August 25, 2024

@Kondratovich Any more thoughts on this?

from jesque.

RyanGuthrie avatar RyanGuthrie commented on August 25, 2024

@gresrun I am in the process of migrating from Resque to Jesque and have a heartbeat feature that needs to be migrated over - sounds like it fits this bill. Time permitting I'll try and get a PR for you.

from jesque.

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.