ribbon-event_bus 0.5.0 → 0.5.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
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 469944571662715f00b9d1b1a15553261223cb61
|
4
|
+
data.tar.gz: 0f7c6dc538d892756c60df64a765fb188352b5e1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8204f47cf39d80495f30b9c74c925fcc59a9f05b548328508ad2093da011b7ddee02b44065cdddb022915b8d09b454a11e9b5d9c69f72073921a4ee41d5c8a9c
|
7
|
+
data.tar.gz: d24f4c4ff762736a9d1d4ef08dad979930c119fc53de53b6dd70aeba8481313b9589b9740c03cf8417d838ad6a6a49b5529e044fd5110cb5957319f29e291c36
|
@@ -12,7 +12,6 @@ module Ribbon::EventBus
|
|
12
12
|
def initialize(instance=nil, params={})
|
13
13
|
super
|
14
14
|
@resque = config.resque? ? config.resque : Resque
|
15
|
-
PublisherWorker.supervise(args: [self], as: worker_id)
|
16
15
|
end
|
17
16
|
|
18
17
|
def worker_id
|
@@ -30,7 +29,11 @@ module Ribbon::EventBus
|
|
30
29
|
# However, if a dead worker is returned, then async calls will silently
|
31
30
|
# fail, allowing normal execution. This makes firing events best-effort.
|
32
31
|
def worker
|
33
|
-
|
32
|
+
# Retrieve the PublisherWorker or start the supervisor.
|
33
|
+
w = Celluloid::Actor[worker_id] || PublisherWorker.supervise(
|
34
|
+
args: [self],
|
35
|
+
as: worker_id
|
36
|
+
).send(worker_id)
|
34
37
|
|
35
38
|
3.times {
|
36
39
|
if w.dead?
|