polling now uses blpop, fixed (string) casts. #58

Closed
wants to merge 8 commits into
from

Conversation

Projects
None yet
4 participants

Hi, I changed the work polling to use blpop, with that you get job as soon as it's one available, and also you can monitor many keys at once.

  • Added support for php-redis if it's available.
  • Fixed some missing (string) casts.

on commit 21edc2f I fixed a bug: there was missing some (string) casts, resulting in that "Object" was stored on redis instead of the worker ID.

ingoclaro closed this Jun 6, 2012

ingoclaro reopened this Jun 6, 2012

Contributor

ruudk commented Jul 26, 2012

@chrisboulton What's the status on this? We would really want to use PHP Resque but we want that realtime feeling that blpop gives. Could you merge this in?

Owner

chrisboulton commented Jul 26, 2012

I want to bring this down in to the next release - excited by these changes as well. The one thing it's missing (and I'm not sure how to handle yet) is some sort of test or two.

Contributor

ruudk commented Jul 27, 2012

Maybe @ingoclaro can supply some unittests?

jbrower commented Dec 10, 2012

Any news on this or any way that I can help? I would love to have this functionality.

Hi all, I'm aware that I included too many changes in this pull request, sorry for that.
The thing is that I haven't time to add the tests you are requesting, I'm currently using this on production and works very well for me with 100+ workers per queue. I corrected some bugs regarding string assignments and also if you try to have more than 1 worker.

Note that I also changed the way to check for the queues, as now it uses blpop it can check all queues simultaneously and it must be done so if you want to process the jobs as soon as one is on the queue.

jbrower commented Dec 10, 2012

@chrisboulton what do you think it would take to get this implemented. It looks like quite a few changes have happened since the 4 months the pull request was made. If something like this could be implemented, that would resolve 2 issues/pull requests and would certainly make php-resque more responsive, especially when queues will occasionally be empty.

The code seems fairly solid, though I've not had a chance to test that myself.

Owner

chrisboulton commented Jun 1, 2013

Hi,

Looks like we're going to include this for BLPOP support: #63

I apologize for not giving this PR the time it deserved when it was raised. :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment