Code Monkey home page Code Monkey logo

Comments (3)

edgurgel avatar edgurgel commented on May 27, 2024

I would simply have multiple queues for different needs. It's a lot easier to have queues for each different priority (low, high, etc) for your application. I wouldn't build such feature as part of Verk TBH.

from verk.

ahmadferdous avatar ahmadferdous commented on May 27, 2024

Thanks for your response.

With verk, is it possible to have one worker (or a pool or workers doing the same thing) that all consume from the same set of job queues? For example, let's assume we have 3 queues for 3 different priorities (low, medium, high) for the same kind of job. We have 2 instances of the same worker, who will get jobs according to priority. So, jobs in high priority will be executed first. Jobs in medium queue will be processed only if there's nothing in high priority queue. This kind of scenario is relevant when we have rate limiting constraint and we want to serve high priority clients first.

I could not figure out the answer from README file and that's why I'm asking here.

from verk.

edgurgel avatar edgurgel commented on May 27, 2024

No there's no such thing but you can achieve something similar by having more workers for the high priority. For example:

  • low - 1 worker
  • medium - 5 workers
  • high - 10 workers

So up to 10 concurrent jobs will run for the high queue, 5 for the medium and just 1 for low.

Sadly it won't use all workers if just low jobs are available.

from verk.

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.