summaryrefslogtreecommitdiff
path: root/lib/custodian/queue.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/custodian/queue.rb')
-rw-r--r--lib/custodian/queue.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/custodian/queue.rb b/lib/custodian/queue.rb
index a6e062c..d1f2057 100644
--- a/lib/custodian/queue.rb
+++ b/lib/custodian/queue.rb
@@ -82,7 +82,11 @@ module Custodian
# Fetch a job from the queue - the timeout parameter is ignored.
#
def fetch(timeout)
- @redis.lpop( "queue" )
+ job = false
+ while( ! job )
+ job = @redis.lpop( "queue" )
+ end
+ return( job )
end
#