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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5ada0d46b0a235c1abf39ac7f977f5e9c31912b1
4
- data.tar.gz: ee2c9c6953525bdea273d228406b3dcf31455d92
3
+ metadata.gz: 91702af1befdb112094f279375eb4f7ec348f82d
4
+ data.tar.gz: 5d1009a783a150a8693b1457a68a7312cb8593c8
5
5
  SHA512:
6
- metadata.gz: 09758baa145995bbd5aa223b60e6f709e87900624846afc73f15bc771aa1ff21cd11009865609b8fe162a3b552c6f97a85f383c34b816913e38973be9617d699
7
- data.tar.gz: d07f73260747c3b8e21f94e85d0cd8ce8f023eb28a73bd873c87b612d53214c1bb7617ad424753e6b317073098df7980af4120ac50447183e4ad735519092596
6
+ metadata.gz: 9c849017202086ba1689aa1aa4c7c6d6c6a2ed53edce3e364266ec17b85a5b4808694cc542c3aaa7bdd2f76212884c67054dd4ee2d657b6f69baab5cbea5db4b
7
+ data.tar.gz: 202b90459198f4e767bfc95cf511e15d5d014980fff965345452e7947fa329f532636ed970de180240bf222ffbde95348945e21d481935f9632265c08223e80f
@@ -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
@@ -1,5 +1,5 @@
1
1
  module Resugan
2
2
  module Worker
3
- VERSION = "0.1.1"
3
+ VERSION = "0.1.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: resugan-worker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joseph Emmanuel Dayo