reactor 1.0.1 → 1.0.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: 801fdf2911064bd26d3dcdc17fc2c44113babf31
4
- data.tar.gz: 608303ff151d01ca5944916bb4f6b411d0e91c56
3
+ metadata.gz: 7722e1b720fa64bf0dfb122a2f862f1c3c6a8e92
4
+ data.tar.gz: c25bc2eb183f7668caba3b3c0984d0d5ee98961b
5
5
  SHA512:
6
- metadata.gz: 21922a16e59166cdfb82f09a3fec6f794a866f58f3018c8603745acc3f7a7fa0769db80c84dd48dbd9447b3b70ff6912760cf7298f8a9154737ec23be13411ec
7
- data.tar.gz: 462f6c5df18b34ef4688c1add0d55624e9fe32af17b9e68d62a09624ea932c5f7383dbdde84659c1187c0237c8c558c08af158d2a02866039a66c5f358f3ea48
6
+ metadata.gz: 7fd2c73866d3765b36bc8782d306be017c616c2c31ce540774bdfd3fa77959687e22f7e88d22af234107ae98c8b6f4ef684cf3eaa2fe16785baa94d6aa2c4055
7
+ data.tar.gz: 73589d859774dd8ef15e6b7a80ac719be3456d6bdd6e7c91d6233a83921c0b120d27b33d68b0b62736f312eb9833352c745cf9fc54eb2184578ef6a6e2d26af8
data/Changes.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # Reactor Change Log
2
2
 
3
+ 1.0.2
4
+ ------
5
+
6
+ Fix issue #82, a performance bug with `publishes at: :updated_at` style
7
+ ActiveRecord publishers
8
+
9
+ 1.0.1
10
+ -----
11
+
12
+ Update Rails Dependency
13
+
14
+ 1.0.0
15
+ -------
16
+
17
+ Cleanup of old deprecated methods, general overhauls
18
+
19
+
3
20
  0.17.0
4
21
  ----------
5
22
  `publishes` method in publishable now accepts `:enqueue_if` option
data/Gemfile.lock CHANGED
@@ -1,8 +1,8 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- reactor (1.0.0)
5
- rails
4
+ reactor (1.0.2)
5
+ rails (~> 5.1.2)
6
6
  sidekiq (> 4.0)
7
7
 
8
8
  GEM
@@ -55,25 +55,25 @@ GEM
55
55
  coderay (1.1.1)
56
56
  concurrent-ruby (1.0.5)
57
57
  connection_pool (2.2.1)
58
- crass (1.0.4)
59
58
  diff-lcs (1.3)
60
59
  docile (1.1.5)
61
- erubi (1.7.0)
62
- globalid (0.4.1)
60
+ erubi (1.6.1)
61
+ globalid (0.4.0)
63
62
  activesupport (>= 4.2.0)
64
63
  i18n (0.8.6)
65
64
  json (2.1.0)
66
- loofah (2.2.2)
67
- crass (~> 1.0.2)
65
+ loofah (2.0.3)
68
66
  nokogiri (>= 1.5.9)
69
- mail (2.7.0)
70
- mini_mime (>= 0.1.1)
67
+ mail (2.6.6)
68
+ mime-types (>= 1.16, < 4)
71
69
  method_source (0.8.2)
72
- mini_mime (1.0.0)
70
+ mime-types (3.1)
71
+ mime-types-data (~> 3.2015)
72
+ mime-types-data (3.2016.0521)
73
73
  mini_portile2 (2.3.0)
74
74
  minitest (5.10.2)
75
- nio4r (2.2.0)
76
- nokogiri (1.8.2)
75
+ nio4r (2.1.0)
76
+ nokogiri (1.8.1)
77
77
  mini_portile2 (~> 2.3.0)
78
78
  pry (0.10.4)
79
79
  coderay (~> 1.1.0)
@@ -102,8 +102,8 @@ GEM
102
102
  rails-dom-testing (2.0.3)
103
103
  activesupport (>= 4.2.0)
104
104
  nokogiri (>= 1.6)
105
- rails-html-sanitizer (1.0.4)
106
- loofah (~> 2.2, >= 2.2.2)
105
+ rails-html-sanitizer (1.0.3)
106
+ loofah (~> 2.0)
107
107
  railties (5.1.2)
108
108
  actionpack (= 5.1.2)
109
109
  activesupport (= 5.1.2)
@@ -111,7 +111,7 @@ GEM
111
111
  rake (>= 0.8.7)
112
112
  thor (>= 0.18.1, < 2.0)
113
113
  rake (12.0.0)
114
- redis (4.0.1)
114
+ redis (3.3.3)
115
115
  rspec (3.6.0)
116
116
  rspec-core (~> 3.6.0)
117
117
  rspec-expectations (~> 3.6.0)
@@ -128,11 +128,11 @@ GEM
128
128
  diff-lcs (>= 1.2.0, < 2.0)
129
129
  rspec-support (~> 3.6.0)
130
130
  rspec-support (3.6.0)
131
- sidekiq (5.0.5)
131
+ sidekiq (5.0.4)
132
132
  concurrent-ruby (~> 1.0)
133
133
  connection_pool (~> 2.2, >= 2.2.0)
134
134
  rack-protection (>= 1.5.0)
135
- redis (>= 3.3.4, < 5)
135
+ redis (~> 3.3, >= 3.3.3)
136
136
  simplecov (0.14.1)
137
137
  docile (~> 1.1.0)
138
138
  json (>= 1.8, < 3)
@@ -155,7 +155,7 @@ GEM
155
155
  thread_safe (~> 0.1)
156
156
  websocket-driver (0.6.5)
157
157
  websocket-extensions (>= 0.1.0)
158
- websocket-extensions (0.1.3)
158
+ websocket-extensions (0.1.2)
159
159
 
160
160
  PLATFORMS
161
161
  ruby
data/lib/reactor/event.rb CHANGED
@@ -77,19 +77,20 @@ class Reactor::Event
77
77
 
78
78
  def reschedule(name, data = {})
79
79
  scheduled_jobs = Sidekiq::ScheduledSet.new
80
- job = scheduled_jobs.detect do |job|
80
+ # Note that scheduled_jobs#fetch returns only jobs matching the data[:was]
81
+ # timestamp - down to fractions of a second
82
+ job = scheduled_jobs.fetch(data[:was].to_f).detect do |job|
81
83
  next if job['class'] != self.name.to_s
82
84
 
83
85
  same_event_name = job['args'].first == name.to_s
84
- same_at_time = job.score.to_i == data[:was].to_i
85
86
 
86
87
  if data[:actor]
87
88
  same_actor = job['args'].second['actor_type'] == data[:actor].class.name &&
88
89
  job['args'].second['actor_id'] == data[:actor].id
89
90
 
90
- same_event_name && same_at_time && same_actor
91
+ same_event_name && same_actor
91
92
  else
92
- same_event_name && same_at_time
93
+ same_event_name
93
94
  end
94
95
  end
95
96
 
@@ -1,3 +1,3 @@
1
1
  module Reactor
2
- VERSION = "1.0.1"
2
+ VERSION = "1.0.2"
3
3
  end
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: 1.0.1
4
+ version: 1.0.2
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: 2018-04-30 00:00:00.000000000 Z
14
+ date: 2018-06-19 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: rails