reactor 0.9.4 → 0.9.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/reactor/event.rb +8 -13
- data/lib/reactor/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2f68e85e0e74847f96c21488a9c501839d9f6e63
|
4
|
+
data.tar.gz: 9a604a01797f2ca97b72510ab25442e505853630
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c7d15a00dd0bcac36828b89a4a5aee6b953dc955beba2243e057268902466acf56e3f8357a27857d70a2425c22aef54372903bedbb1e88ab78562fc0c9fde3e2
|
7
|
+
data.tar.gz: bd054bf8cfd108603c718d9cb39ff10d2010fdc2744e8a898e2f950cda19f30ab5af1528fb3eeb9bc6156f3c7039f0dc7d6b9957b62a0e6f2dd07217906a8c0e
|
data/lib/reactor/event.rb
CHANGED
@@ -66,23 +66,18 @@ class Reactor::Event
|
|
66
66
|
def reschedule(name, data = {})
|
67
67
|
scheduled_jobs = Sidekiq::ScheduledSet.new
|
68
68
|
job = scheduled_jobs.detect do |job|
|
69
|
-
|
70
|
-
same_name = job['args'].first == name.to_s
|
71
|
-
same_at = job.score.to_i == data[:was].to_i
|
69
|
+
return false if job['class'] != self.name.to_s
|
72
70
|
|
73
|
-
|
74
|
-
|
71
|
+
same_event_name = job['args'].first == name.to_s
|
72
|
+
same_at_time = job.score.to_i == data[:was].to_i
|
75
73
|
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
else
|
80
|
-
same_actor = false
|
81
|
-
end
|
74
|
+
if data[:actor]
|
75
|
+
same_actor = job['args'].second['actor_type'] == data[:actor].class.name &&
|
76
|
+
job['args'].second['actor_id'] == data[:actor].id
|
82
77
|
|
83
|
-
|
78
|
+
same_event_name && same_at_time && same_actor
|
84
79
|
else
|
85
|
-
|
80
|
+
same_event_name && same_at_time
|
86
81
|
end
|
87
82
|
end
|
88
83
|
|
data/lib/reactor/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: reactor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- winfred
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2015-01-
|
14
|
+
date: 2015-01-08 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: sidekiq
|