resugan-worker 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/resugan/worker.rb +5 -1
- data/lib/resugan/worker/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 91702af1befdb112094f279375eb4f7ec348f82d
|
4
|
+
data.tar.gz: 5d1009a783a150a8693b1457a68a7312cb8593c8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9c849017202086ba1689aa1aa4c7c6d6c6a2ed53edce3e364266ec17b85a5b4808694cc542c3aaa7bdd2f76212884c67054dd4ee2d657b6f69baab5cbea5db4b
|
7
|
+
data.tar.gz: 202b90459198f4e767bfc95cf511e15d5d014980fff965345452e7947fa329f532636ed970de180240bf222ffbde95348945e21d481935f9632265c08223e80f
|
data/lib/resugan/worker.rb
CHANGED
@@ -28,7 +28,7 @@ module Resugan
|
|
28
28
|
|
29
29
|
::Kernel.loop do
|
30
30
|
eval_queue
|
31
|
-
sleep 1
|
31
|
+
sleep 1 if @queue.queue_count == 0
|
32
32
|
end
|
33
33
|
end
|
34
34
|
|
@@ -36,6 +36,10 @@ module Resugan
|
|
36
36
|
@redis = redis
|
37
37
|
end
|
38
38
|
|
39
|
+
def reset_queue
|
40
|
+
@queue.delete_all!
|
41
|
+
end
|
42
|
+
|
39
43
|
protected
|
40
44
|
|
41
45
|
def redis
|