technoweenie / coffee-resque

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

polling algorithm is so wrong

technoweenie opened this issue · comments

The polling method is totally wrong. Given a list of queues like High/Medium/Low, Resque should process all the High jobs before moving to the Medium queue.

I guess, the optimum way to achieve this would be:

  1. Create three queues: High, Medium and Low
  2. Create three separate workers for each queue with priority sensitive timeouts like, High-Worker with timeout:1000, Medium-Worker with timeout:5000 and Low-Worker with timeout:200000 or something like that.

Introducing intelligent polling would unnecessarily complicate matters.

-Animesh

Maybe there's a need for this feature in the future.