Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sleep x seconds if no blocking queue was found #370

Closed
wants to merge 1 commit into from

Conversation

razonyang
Copy link

QUEUE=* AND BLOCKING will crash workers sometimes, because there is no queue exists, when Resque_Job::reserveBlocking($emptyQueues, $timeout) was invoke, the following error will be shown:

PHP Fatal error: Uncaught CredisException: wrong number of arguments for 'blpop' command in /home/razon/Develop/Projects/php-resque/vendor/colinmollenhour/credis/Client.php:1167
Stack trace:
#0 /home/razon/Develop/Projects/php-resque/vendor/colinmollenhour/credis/Client.php(905): Credis_Client->read_reply('blpop')
#1 /home/razon/Develop/Projects/php-resque/lib/Resque/Redis.php(249): Credis_Client->__call('blpop', Array)
#2 /home/razon/Develop/Projects/php-resque/lib/Resque.php(178): Resque_Redis->__call('blpop', Array)
#3 /home/razon/Develop/Projects/php-resque/lib/Resque/Job.php(112): Resque::blpop(Array, 5)
#4 /home/razon/Develop/Projects/php-resque/lib/Resque/Worker.php(270): Resque_Job::reserveBlocking(Array, 5)
#5 /home/razon/Develop/Projects/php-resque/lib/Resque/Worker.php(165): Resque_Worker->reserve(true, 5)
#6 /home/razon/Develop/Projects/php-resque/bin/resque(109): Resque_Worker->work(5, true)
#7 {main}

Reproduce

  1. FLUSHALL redis database - In order to clear the set prefix:queues.
  2. EXEC BLOCKING=1 VERBOSE=1 COUNT=2 QUEUE=* bin/resque

danhunsaker added a commit to resque/php-resque that referenced this pull request Dec 11, 2018
@razonyang razonyang closed this Mar 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant