Giter Club home page Giter Club logo

agenda-example's Introduction

Update

This issue has been resolved agenda/agenda#412 (comment)

Example Agenda usage

Issue:

  • Agenda defaultConcurrency settings is not working as expected.

Expected:

  • If defaultConcurrency is set to 5 then each worker process is allowed to process up to 5 jobs of the same type

Actual:

  • When defaultConcurrency is set to 5, two worker processes will only process 5 jobs total, instead of 5 jobs each

Steps to reproduce:

  1. Checkout this repo (you should also have mongo running locally)
  2. yarn install
  3. yarn start (start the dev server on port 3000)
  4. Open browser to http://localhost:3000/agendash
    • this will show all the jobs that agenda knows about, there should be none at this point
  5. Open a new terminal window, run yarn queue-jobs --name job-1 --num 10
    • this will queue up 10 runs of job-1
  6. Now, in agendash you should see 10 jobs of job-1 "Queued"
  7. Open a terminal window, run yarn worker
    • this will start a worker process
  8. Now, in agendash you should see there are 5 jobs "Running" and 5 jobs "Queued"
  9. Open a terminal window, run yarn worker to start a second worker process
  10. Now, there are still 5 jobs "Running" and 5 jobs "Queued", the second worker process has not picked up any jobs.

agenda-example's People

Contributors

dylanjha avatar

Forkers

hugopoi

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.