resque_stuck_queue 0.2.0 → 0.2.1

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
- SHA512:
3
- metadata.gz: 8441e82a5f962f49c9de740fd9a843c50b3125458c69f08598b210774b2920f6bac676f87a748c095aafdcc86799934229a03ba5c2cc0c8a906f3834f484cc7c
4
- data.tar.gz: 824e77bbf4ab0c7fa6b150e69ed0a4845d4e6a18022715b51880e60af7ba189be704277d0776aa91bbe39003b09f5b8f22895421484b10bb6c454b73f77391d7
5
2
  SHA1:
6
- metadata.gz: ec5948be0403dbafd9958e4dbb650f88ebd15de2
7
- data.tar.gz: a97a2968698d72fa37b14d1ba3eabe7e9345d9cf
3
+ metadata.gz: 21e22e07449416caa592d83157978103b6d3cb25
4
+ data.tar.gz: 52261706a53625364f3bddc7c531e8e1a1e38fa8
5
+ SHA512:
6
+ metadata.gz: 8da0b6facf25ed6034205a78d0ace7cac2c62aae772b6fbd0a2ae4c7d4fa5964f61f7ee341b7c784ef3e30b89561d4cff1fb012faf97f3206d1e54a87845b0d3
7
+ data.tar.gz: e1fa87dff4f06d265d2e9a9a5facfe84fa9a1d42891c1f1e259f3850c8fe9ce10e032eeff2b9955bdf827ba5142520f542bc318ee8879669fbee2e1c524f9a9f
data/README.md CHANGED
@@ -73,7 +73,7 @@ queues:
73
73
  abort_on_exception:
74
74
  optional, if you want the resque-stuck-queue threads to explicitly raise, default is false
75
75
 
76
- refresh_job:
76
+ heartbeat_job:
77
77
  optional, your own custom refreshing job. if you are using something other than resque
78
78
 
79
79
  </pre>
@@ -76,8 +76,8 @@ module Resque
76
76
 
77
77
  Redis::Classy.db = redis if Redis::Classy.db.nil?
78
78
 
79
- enqueue_repeating_heartbeat_job
80
- setup_checker_thread
79
+ setup_heartbeat_thread
80
+ setup_watcher_thread
81
81
 
82
82
  # fo-eva.
83
83
  @threads.map(&:join)
@@ -122,7 +122,7 @@ module Resque
122
122
 
123
123
  private
124
124
 
125
- def enqueue_repeating_heartbeat_job
125
+ def setup_heartbeat_thread
126
126
  @threads << Thread.new do
127
127
  Thread.current.abort_on_exception = config[:abort_on_exception]
128
128
  logger.info("Starting heartbeat thread")
@@ -143,13 +143,11 @@ module Resque
143
143
  else
144
144
  queues.each do |queue_name|
145
145
  Resque.enqueue_to(queue_name, HeartbeatJob, [heartbeat_key_for(queue_name), redis.client.host, redis.client.port])
146
- queue_name = :snapshot_progress
147
- Resque.enqueue_to(queue_name, HeartbeatJob, [Resque::StuckQueue.heartbeat_key_for(queue_name), Resque.redis.client.host, Resque.redis.client.port])
148
146
  end
149
147
  end
150
148
  end
151
149
 
152
- def setup_checker_thread
150
+ def setup_watcher_thread
153
151
  @threads << Thread.new do
154
152
  Thread.current.abort_on_exception = config[:abort_on_exception]
155
153
  logger.info("Starting checker thread")
@@ -1,5 +1,5 @@
1
1
  module Resque
2
2
  module StuckQueue
3
- VERSION = "0.2.0"
3
+ VERSION = "0.2.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: resque_stuck_queue
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shai Rosenfeld