sidekiq-scheduler-multihost 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -5
- data/lib/sidekiq_scheduler_multihost.rb +2 -2
- data/lib/sidekiq_scheduler_multihost/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: 42dc3fa9196c11e8d957fc645d7bcac6aee53347
|
4
|
+
data.tar.gz: 7452d0b875e0513066681484b02b28c1730b87cf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d690ed04a8eb40c466ead19d9886105bbcc5a5f50ec550e6cef6bd63a3d986a33cc3aa4bf01d5570f5d28f6739a354373b169a321a53524fec54cbaa1dd9ce1e
|
7
|
+
data.tar.gz: aa288dcc2d1c0e65480a4d9092ad6c35c35ab09a7dc48111cc1b0e114287e45a764332ec7302c44eaa8ece21eba1ace5b1f4645140c8e1ed73372d1fa79d5720
|
data/README.md
CHANGED
@@ -1,8 +1,6 @@
|
|
1
1
|
# Sidekiq::Scheduler::Multihost
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
TODO: Delete this and the text above, and describe your gem
|
3
|
+
This gem is intended to be a plug-and-play solution for running sidekiq-scheduler in a multi-host environment. It relies on Sidekiq's Redis instance for storing a heartbeat, rufus-scheduler (a depedency of sidekiq-scheduler) for the actual heartbeating, and Sidekiq for running a task called Defibrillator which will cause another host to take over if the current scheduler goes down.
|
6
4
|
|
7
5
|
## Installation
|
8
6
|
|
@@ -22,8 +20,6 @@ Or install it yourself as:
|
|
22
20
|
|
23
21
|
## Usage
|
24
22
|
|
25
|
-
This gem is intended to be a plug-and-play solution for running sidekiq-scheduler in a multi-host environment. It relies on Sidekiq's Redis instance for storing a heartbeat, rufus-scheduler (a depedency of sidekiq-scheduler) for the actual heartbeating, and Sidekiq for running a task called Defibrillator which will cause another host to take over if the current scheduler goes down.
|
26
|
-
|
27
23
|
Just include the gem and it will set up the heartbeat, place a defibrillator job in the queue, and start sidekiq-scheduler. You will still need to load the schedule yourself, with an initializer that does something like:
|
28
24
|
|
29
25
|
```ruby
|
@@ -10,10 +10,10 @@ require "sidekiq_scheduler_multihost/workers/defibrillator"
|
|
10
10
|
|
11
11
|
Sidekiq.configure_server do |config|
|
12
12
|
config.on(:startup) do
|
13
|
-
SidekiqSchedulerMultihost::Heartbeat.start
|
13
|
+
SidekiqSchedulerMultihost::Heartbeat.new.start
|
14
14
|
end
|
15
15
|
|
16
16
|
config.on(:shutdown) do
|
17
|
-
SidekiqSchedulerMultihost::Heartbeat.stop
|
17
|
+
SidekiqSchedulerMultihost::Heartbeat.new.stop
|
18
18
|
end
|
19
19
|
end
|