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 present
changed checking of queues to use blPop, it is more efficient than lo…
…oping and waiting
added message to notify the redis connection
added missing (string)
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.
removed echo of redis connection, as it intefered with the cake plugi…
…n when used from a controller
added redis flag to indicate finished Job
check for pgrep and use it instead of ps | grep, as the later gives e…
…rrors on debian
handling and monitoring created childrens
@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?
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.
Maybe @ingoclaro can supply some unittests?
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.
@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.
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. :(