inst-jobs 0.15.4 → 0.15.5

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
  SHA256:
3
- metadata.gz: 11f57ce391944d07cd3f415023ea4ad614e94c34c4bac595b020ba5756c1b104
4
- data.tar.gz: ea2255af9d5d1773263c19734f5d6b4731690846dc32a6a739ea902452721c85
3
+ metadata.gz: ec568aafa04aa958061f78e677b5db73d5053d251f18b2cd6ffc87e032c3c656
4
+ data.tar.gz: e42b99cfa96f1eba59e86589ad05db68b1ae5be18c90caf2baa1ec4f878b5ff1
5
5
  SHA512:
6
- metadata.gz: 27a4b477c84a5ab4800ac722f7a41d5952f11723770308075cd214034375497cfe4b96ab6cc0e3811f631698b5d0c6ada8741ce355d150bea6facf14f733d070
7
- data.tar.gz: a7ba37a1efa1e7b7f25316fa84d0a619913ec3a676c389c1f7279f60d2b34b62d2f3703f563c768b447a1cc4160987976e992c26d0df80204a52c479d275a96a
6
+ metadata.gz: 4d7d973fac64918cea16eb1a7b21009f39910bb87d2fb848014f6c9cf53effe439a1aa0d13cab62518f0239481e440fc92c7bc3f4246454ecb155e939517f50c
7
+ data.tar.gz: 565e5474ed3825f3c2f152ed46674c0c346fbeae73c0a5ebec1d6b0041a95973ed07f348d8f8aec8484bb8525e97c5b683df13fb2fa82a8fce72071ed04d0d83
@@ -30,7 +30,7 @@ module Delayed
30
30
  private
31
31
  def prepare_batches(mode, opts)
32
32
  raise "nested batching is not supported" if Delayed::Job.batches
33
- Delayed::Job.batches = Hash.new { |h,k| h[k] = [] }
33
+ Delayed::Job.batches = Hash.new { |h,k| h[k] = Set.new }
34
34
  batch_enqueue_args = [:queue]
35
35
  batch_enqueue_args << :priority unless opts[:priority]
36
36
  Delayed::Job.batch_enqueue_args = batch_enqueue_args
@@ -1,3 +1,3 @@
1
1
  module Delayed
2
- VERSION = "0.15.4"
2
+ VERSION = "0.15.5"
3
3
  end
@@ -81,5 +81,16 @@ shared_examples_for 'Delayed::Batch' do
81
81
  Delayed::Job.find_available(1).first.tag.should == "String#size"
82
82
  Delayed::Job.find_available(1).first.priority.should == 11
83
83
  end
84
+
85
+ it "should list a job only once when the same call is made multiple times" do
86
+ Delayed::Batch.serial_batch(:priority => 11) {
87
+ "string".send_later_enqueue_args(:size, no_delay: true)
88
+ "string".send_later_enqueue_args(:gsub, { no_delay: true }, /./, "!")
89
+ "string".send_later_enqueue_args(:size, no_delay: true)
90
+ }
91
+ batch_job = Delayed::Job.find_available(1).first
92
+ jobs = batch_job.payload_object.jobs
93
+ jobs.size.should == 2
94
+ end
84
95
  end
85
96
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: inst-jobs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.15.4
4
+ version: 0.15.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tobias Luetke
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2018-11-19 00:00:00.000000000 Z
12
+ date: 2018-11-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activerecord
@@ -407,9 +407,7 @@ files:
407
407
  - spec/delayed/worker/health_check_spec.rb
408
408
  - spec/delayed/worker_spec.rb
409
409
  - spec/gemfiles/42.gemfile
410
- - spec/gemfiles/42.gemfile.lock
411
410
  - spec/gemfiles/50.gemfile
412
- - spec/gemfiles/50.gemfile.lock
413
411
  - spec/gemfiles/51.gemfile
414
412
  - spec/gemfiles/52.gemfile
415
413
  - spec/migrate/20140924140513_add_story_table.rb
@@ -447,32 +445,30 @@ signing_key:
447
445
  specification_version: 4
448
446
  summary: Instructure-maintained fork of delayed_job
449
447
  test_files:
450
- - spec/active_record_job_spec.rb
448
+ - spec/sample_jobs.rb
449
+ - spec/spec_helper.rb
450
+ - spec/redis_job_spec.rb
451
+ - spec/gemfiles/42.gemfile
452
+ - spec/gemfiles/52.gemfile
453
+ - spec/gemfiles/50.gemfile
454
+ - spec/gemfiles/51.gemfile
455
+ - spec/shared_jobs_specs.rb
456
+ - spec/shared/performable_method.rb
457
+ - spec/shared/testing.rb
458
+ - spec/shared/delayed_batch.rb
459
+ - spec/shared/worker.rb
460
+ - spec/shared/delayed_method.rb
461
+ - spec/shared/shared_backend.rb
462
+ - spec/migrate/20140924140513_add_story_table.rb
463
+ - spec/delayed/server_spec.rb
451
464
  - spec/delayed/cli_spec.rb
452
465
  - spec/delayed/daemon_spec.rb
453
- - spec/delayed/server_spec.rb
466
+ - spec/delayed/worker_spec.rb
454
467
  - spec/delayed/settings_spec.rb
455
468
  - spec/delayed/work_queue/in_process_spec.rb
469
+ - spec/delayed/work_queue/parent_process_spec.rb
456
470
  - spec/delayed/work_queue/parent_process/client_spec.rb
457
471
  - spec/delayed/work_queue/parent_process/server_spec.rb
458
- - spec/delayed/work_queue/parent_process_spec.rb
459
- - spec/delayed/worker/consul_health_check_spec.rb
460
472
  - spec/delayed/worker/health_check_spec.rb
461
- - spec/delayed/worker_spec.rb
462
- - spec/gemfiles/42.gemfile
463
- - spec/gemfiles/42.gemfile.lock
464
- - spec/gemfiles/50.gemfile
465
- - spec/gemfiles/50.gemfile.lock
466
- - spec/gemfiles/51.gemfile
467
- - spec/gemfiles/52.gemfile
468
- - spec/migrate/20140924140513_add_story_table.rb
469
- - spec/redis_job_spec.rb
470
- - spec/sample_jobs.rb
471
- - spec/shared/delayed_batch.rb
472
- - spec/shared/delayed_method.rb
473
- - spec/shared/performable_method.rb
474
- - spec/shared/shared_backend.rb
475
- - spec/shared/testing.rb
476
- - spec/shared/worker.rb
477
- - spec/shared_jobs_specs.rb
478
- - spec/spec_helper.rb
473
+ - spec/delayed/worker/consul_health_check_spec.rb
474
+ - spec/active_record_job_spec.rb
@@ -1,190 +0,0 @@
1
- PATH
2
- remote: ../..
3
- specs:
4
- inst-jobs (0.14.2)
5
- after_transaction_commit (>= 1.0, < 3)
6
- rails (>= 4.2)
7
- redis (> 3.0)
8
- redis-scripting (~> 1.0.1)
9
- rufus-scheduler (~> 3.4)
10
-
11
- GEM
12
- remote: https://rubygems.org/
13
- specs:
14
- actionmailer (4.2.8)
15
- actionpack (= 4.2.8)
16
- actionview (= 4.2.8)
17
- activejob (= 4.2.8)
18
- mail (~> 2.5, >= 2.5.4)
19
- rails-dom-testing (~> 1.0, >= 1.0.5)
20
- actionpack (4.2.8)
21
- actionview (= 4.2.8)
22
- activesupport (= 4.2.8)
23
- rack (~> 1.6)
24
- rack-test (~> 0.6.2)
25
- rails-dom-testing (~> 1.0, >= 1.0.5)
26
- rails-html-sanitizer (~> 1.0, >= 1.0.2)
27
- actionview (4.2.8)
28
- activesupport (= 4.2.8)
29
- builder (~> 3.1)
30
- erubis (~> 2.7.0)
31
- rails-dom-testing (~> 1.0, >= 1.0.5)
32
- rails-html-sanitizer (~> 1.0, >= 1.0.3)
33
- activejob (4.2.8)
34
- activesupport (= 4.2.8)
35
- globalid (>= 0.3.0)
36
- activemodel (4.2.8)
37
- activesupport (= 4.2.8)
38
- builder (~> 3.1)
39
- activerecord (4.2.8)
40
- activemodel (= 4.2.8)
41
- activesupport (= 4.2.8)
42
- arel (~> 6.0)
43
- activesupport (4.2.8)
44
- i18n (~> 0.7)
45
- minitest (~> 5.1)
46
- thread_safe (~> 0.3, >= 0.3.4)
47
- tzinfo (~> 1.1)
48
- addressable (2.5.2)
49
- public_suffix (>= 2.0.2, < 4.0)
50
- after_transaction_commit (1.1.1)
51
- activerecord (>= 4.0)
52
- arel (6.0.4)
53
- backports (3.7.0)
54
- builder (3.2.3)
55
- bump (0.5.3)
56
- byebug (9.0.6)
57
- coderay (1.1.1)
58
- concurrent-ruby (1.0.5)
59
- database_cleaner (1.6.1)
60
- diff-lcs (1.3)
61
- erubis (2.7.0)
62
- et-orbi (1.0.9)
63
- tzinfo
64
- globalid (0.4.0)
65
- activesupport (>= 4.2.0)
66
- httpclient (2.8.3)
67
- i18n (0.8.1)
68
- imperium (0.2.4)
69
- addressable (~> 2.5.0)
70
- httpclient (~> 2.8)
71
- loofah (2.0.3)
72
- nokogiri (>= 1.5.9)
73
- mail (2.6.4)
74
- mime-types (>= 1.16, < 4)
75
- method_source (0.8.2)
76
- mime-types (3.1)
77
- mime-types-data (~> 3.2015)
78
- mime-types-data (3.2016.0521)
79
- mini_portile2 (2.1.0)
80
- minitest (5.10.1)
81
- multi_json (1.12.1)
82
- nokogiri (1.7.1)
83
- mini_portile2 (~> 2.1.0)
84
- pg (0.20.0)
85
- pry (0.10.4)
86
- coderay (~> 1.1.0)
87
- method_source (~> 0.8.1)
88
- slop (~> 3.4)
89
- public_suffix (3.0.1)
90
- rack (1.6.5)
91
- rack-protection (1.5.3)
92
- rack
93
- rack-test (0.6.3)
94
- rack (>= 1.0)
95
- rails (4.2.8)
96
- actionmailer (= 4.2.8)
97
- actionpack (= 4.2.8)
98
- actionview (= 4.2.8)
99
- activejob (= 4.2.8)
100
- activemodel (= 4.2.8)
101
- activerecord (= 4.2.8)
102
- activesupport (= 4.2.8)
103
- bundler (>= 1.3.0, < 2.0)
104
- railties (= 4.2.8)
105
- sprockets-rails
106
- rails-deprecated_sanitizer (1.0.3)
107
- activesupport (>= 4.2.0.alpha)
108
- rails-dom-testing (1.0.8)
109
- activesupport (>= 4.2.0.beta, < 5.0)
110
- nokogiri (~> 1.6)
111
- rails-deprecated_sanitizer (>= 1.0.1)
112
- rails-html-sanitizer (1.0.3)
113
- loofah (~> 2.0)
114
- railties (4.2.8)
115
- actionpack (= 4.2.8)
116
- activesupport (= 4.2.8)
117
- rake (>= 0.8.7)
118
- thor (>= 0.18.1, < 2.0)
119
- rake (12.0.0)
120
- redis (4.0.1)
121
- redis-scripting (1.0.1)
122
- redis (>= 3.0)
123
- rspec (3.4.0)
124
- rspec-core (~> 3.4.0)
125
- rspec-expectations (~> 3.4.0)
126
- rspec-mocks (~> 3.4.0)
127
- rspec-core (3.4.4)
128
- rspec-support (~> 3.4.0)
129
- rspec-expectations (3.4.0)
130
- diff-lcs (>= 1.2.0, < 2.0)
131
- rspec-support (~> 3.4.0)
132
- rspec-mocks (3.4.1)
133
- diff-lcs (>= 1.2.0, < 2.0)
134
- rspec-support (~> 3.4.0)
135
- rspec-support (3.4.1)
136
- rufus-scheduler (3.4.2)
137
- et-orbi (~> 1.0)
138
- sinatra (1.4.8)
139
- rack (~> 1.5)
140
- rack-protection (~> 1.4)
141
- tilt (>= 1.3, < 3)
142
- sinatra-contrib (1.4.7)
143
- backports (>= 2.0)
144
- multi_json
145
- rack-protection
146
- rack-test
147
- sinatra (~> 1.4.0)
148
- tilt (>= 1.3, < 3)
149
- slop (3.6.0)
150
- sprockets (3.7.1)
151
- concurrent-ruby (~> 1.0)
152
- rack (> 1, < 3)
153
- sprockets-rails (3.2.0)
154
- actionpack (>= 4.0)
155
- activesupport (>= 4.0)
156
- sprockets (>= 3.0.0)
157
- test_after_commit (0.4.1)
158
- activerecord (>= 3.2)
159
- thor (0.19.4)
160
- thread_safe (0.3.6)
161
- tilt (2.0.7)
162
- timecop (0.7.1)
163
- tzinfo (1.2.3)
164
- thread_safe (~> 0.1)
165
- wwtd (1.3.0)
166
-
167
- PLATFORMS
168
- ruby
169
-
170
- DEPENDENCIES
171
- after_transaction_commit (< 2)
172
- bump
173
- byebug
174
- database_cleaner (= 1.6.1)
175
- imperium (>= 0.2.3)
176
- inst-jobs!
177
- pg
178
- pry
179
- rack-test
180
- rails (~> 4.2.5)
181
- rake
182
- rspec (= 3.4.0)
183
- sinatra
184
- sinatra-contrib
185
- test_after_commit (= 0.4.1)
186
- timecop (= 0.7.1)
187
- wwtd (~> 1.3.0)
188
-
189
- BUNDLED WITH
190
- 1.16.1
@@ -1,188 +0,0 @@
1
- PATH
2
- remote: ../..
3
- specs:
4
- inst-jobs (0.12.3)
5
- after_transaction_commit (~> 1.0)
6
- rails (>= 4.2)
7
- redis (> 3.0)
8
- redis-scripting (~> 1.0.1)
9
- rufus-scheduler (~> 3.3.2)
10
-
11
- GEM
12
- remote: https://rubygems.org/
13
- specs:
14
- actioncable (5.0.2)
15
- actionpack (= 5.0.2)
16
- nio4r (>= 1.2, < 3.0)
17
- websocket-driver (~> 0.6.1)
18
- actionmailer (5.0.2)
19
- actionpack (= 5.0.2)
20
- actionview (= 5.0.2)
21
- activejob (= 5.0.2)
22
- mail (~> 2.5, >= 2.5.4)
23
- rails-dom-testing (~> 2.0)
24
- actionpack (5.0.2)
25
- actionview (= 5.0.2)
26
- activesupport (= 5.0.2)
27
- rack (~> 2.0)
28
- rack-test (~> 0.6.3)
29
- rails-dom-testing (~> 2.0)
30
- rails-html-sanitizer (~> 1.0, >= 1.0.2)
31
- actionview (5.0.2)
32
- activesupport (= 5.0.2)
33
- builder (~> 3.1)
34
- erubis (~> 2.7.0)
35
- rails-dom-testing (~> 2.0)
36
- rails-html-sanitizer (~> 1.0, >= 1.0.3)
37
- activejob (5.0.2)
38
- activesupport (= 5.0.2)
39
- globalid (>= 0.3.6)
40
- activemodel (5.0.2)
41
- activesupport (= 5.0.2)
42
- activerecord (5.0.2)
43
- activemodel (= 5.0.2)
44
- activesupport (= 5.0.2)
45
- arel (~> 7.0)
46
- activesupport (5.0.2)
47
- concurrent-ruby (~> 1.0, >= 1.0.2)
48
- i18n (~> 0.7)
49
- minitest (~> 5.1)
50
- tzinfo (~> 1.1)
51
- after_transaction_commit (1.1.1)
52
- activerecord (>= 4.0)
53
- arel (7.1.4)
54
- backports (3.7.0)
55
- builder (3.2.3)
56
- bump (0.5.3)
57
- byebug (9.0.6)
58
- coderay (1.1.1)
59
- concurrent-ruby (1.0.5)
60
- database_cleaner (1.3.0)
61
- diff-lcs (1.3)
62
- erubis (2.7.0)
63
- globalid (0.4.0)
64
- activesupport (>= 4.2.0)
65
- i18n (0.8.1)
66
- loofah (2.0.3)
67
- nokogiri (>= 1.5.9)
68
- mail (2.6.4)
69
- mime-types (>= 1.16, < 4)
70
- method_source (0.8.2)
71
- mime-types (3.1)
72
- mime-types-data (~> 3.2015)
73
- mime-types-data (3.2016.0521)
74
- mini_portile2 (2.1.0)
75
- minitest (5.10.1)
76
- multi_json (1.12.1)
77
- mustermann (1.0.0.beta2)
78
- nio4r (2.0.0)
79
- nokogiri (1.7.1)
80
- mini_portile2 (~> 2.1.0)
81
- pg (0.20.0)
82
- pry (0.10.4)
83
- coderay (~> 1.1.0)
84
- method_source (~> 0.8.1)
85
- slop (~> 3.4)
86
- rack (2.0.1)
87
- rack-protection (2.0.0.beta2)
88
- rack
89
- rack-test (0.6.3)
90
- rack (>= 1.0)
91
- rails (5.0.2)
92
- actioncable (= 5.0.2)
93
- actionmailer (= 5.0.2)
94
- actionpack (= 5.0.2)
95
- actionview (= 5.0.2)
96
- activejob (= 5.0.2)
97
- activemodel (= 5.0.2)
98
- activerecord (= 5.0.2)
99
- activesupport (= 5.0.2)
100
- bundler (>= 1.3.0, < 2.0)
101
- railties (= 5.0.2)
102
- sprockets-rails (>= 2.0.0)
103
- rails-dom-testing (2.0.2)
104
- activesupport (>= 4.2.0, < 6.0)
105
- nokogiri (~> 1.6)
106
- rails-html-sanitizer (1.0.3)
107
- loofah (~> 2.0)
108
- railties (5.0.2)
109
- actionpack (= 5.0.2)
110
- activesupport (= 5.0.2)
111
- method_source
112
- rake (>= 0.8.7)
113
- thor (>= 0.18.1, < 2.0)
114
- rake (12.0.0)
115
- redis (3.3.3)
116
- redis-scripting (1.0.1)
117
- redis (>= 3.0)
118
- rspec (3.4.0)
119
- rspec-core (~> 3.4.0)
120
- rspec-expectations (~> 3.4.0)
121
- rspec-mocks (~> 3.4.0)
122
- rspec-core (3.4.4)
123
- rspec-support (~> 3.4.0)
124
- rspec-expectations (3.4.0)
125
- diff-lcs (>= 1.2.0, < 2.0)
126
- rspec-support (~> 3.4.0)
127
- rspec-mocks (3.4.1)
128
- diff-lcs (>= 1.2.0, < 2.0)
129
- rspec-support (~> 3.4.0)
130
- rspec-support (3.4.1)
131
- rufus-scheduler (3.3.4)
132
- tzinfo
133
- sinatra (2.0.0.beta2)
134
- mustermann (= 1.0.0.beta2)
135
- rack (~> 2.0)
136
- rack-protection (= 2.0.0.beta2)
137
- tilt (~> 2.0)
138
- sinatra-contrib (2.0.0.beta2)
139
- backports (>= 2.0)
140
- multi_json
141
- mustermann (= 1.0.0.beta2)
142
- rack-protection (= 2.0.0.beta2)
143
- rack-test
144
- sinatra (= 2.0.0.beta2)
145
- tilt (>= 1.3, < 3)
146
- slop (3.6.0)
147
- sprockets (3.7.1)
148
- concurrent-ruby (~> 1.0)
149
- rack (> 1, < 3)
150
- sprockets-rails (3.2.0)
151
- actionpack (>= 4.0)
152
- activesupport (>= 4.0)
153
- sprockets (>= 3.0.0)
154
- test_after_commit (0.4.1)
155
- activerecord (>= 3.2)
156
- thor (0.19.4)
157
- thread_safe (0.3.6)
158
- tilt (2.0.7)
159
- timecop (0.7.1)
160
- tzinfo (1.2.3)
161
- thread_safe (~> 0.1)
162
- websocket-driver (0.6.5)
163
- websocket-extensions (>= 0.1.0)
164
- websocket-extensions (0.1.2)
165
- wwtd (1.3.0)
166
-
167
- PLATFORMS
168
- ruby
169
-
170
- DEPENDENCIES
171
- bump
172
- byebug
173
- database_cleaner (= 1.3.0)
174
- inst-jobs!
175
- pg
176
- pry
177
- rack-test
178
- rails (~> 5.0.0)
179
- rake
180
- rspec (= 3.4.0)
181
- sinatra (= 2.0.0.beta2)
182
- sinatra-contrib (= 2.0.0.beta2)
183
- test_after_commit (= 0.4.1)
184
- timecop (= 0.7.1)
185
- wwtd (~> 1.3.0)
186
-
187
- BUNDLED WITH
188
- 1.14.6