inst-jobs 0.15.1 → 0.15.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 00634b92181e832a402d113aff8052b50e6ecb17989af3110368541a71134988
4
- data.tar.gz: 9688312080e567ebbb6f65a12ce0db2d337669c34ec762ba1cca9c1e5b71de22
3
+ metadata.gz: e0deb2c3e21143ca228243ad931851ee5c037bfa749a45942fa4332df42522cb
4
+ data.tar.gz: 278eb710b0c50dd2421be52e580971f1e2c2eef9ea39f32e34c27773ff0c6745
5
5
  SHA512:
6
- metadata.gz: e36682dbc8aa3642ae64fda59b9cbbf7378c51eda7b26947e111f726eca1ac41d6df3b71fbe68565fe5a7aa26ea230a8f2a9be849bc6254656c33ac2b20cafe3
7
- data.tar.gz: dfaf996d289b21313565b855a13a952922971e2eee61c88b4f2274aee90f63da5685a52a0dca2929d75d6985602de09a435d28f7c7d6379091a9dd8577f6d59f
6
+ metadata.gz: 137a69c00228bb49bda3bea22287d3885affea3739cd7a768dce5cb88902f6677bc9f38780d755abb4f5842d4ccb1253b5a5eb95c3b12172f228b16570c19d23
7
+ data.tar.gz: 62ad7ce04753f85ce61e1b3ab99fe64635ee119b797af36209d164ed199024c020a7f9056e0affe620091a737ea05b652a54dbe417a7cd02248cd70314635605
@@ -71,8 +71,10 @@ module Delayed
71
71
  # 500.times { |i| "ohai".send_later_enqueue_args(:reverse, { :run_at => (12.hours.ago + (rand(24.hours.to_i))) }) }
72
72
  # then fire up your workers
73
73
  # you can check out strand correctness: diff test1.txt <(sort -n test1.txt)
74
- def self.ready_to_run
75
- where("run_at<=? AND locked_at IS NULL AND next_in_strand=?", db_time_now, true)
74
+ def self.ready_to_run(forced_latency: nil)
75
+ now = db_time_now
76
+ now -= forced_latency if forced_latency
77
+ where("run_at<=? AND locked_at IS NULL AND next_in_strand=?", now, true)
76
78
  end
77
79
  def self.by_priority
78
80
  order(:priority, :run_at, :id)
@@ -203,7 +205,8 @@ module Delayed
203
205
  min_priority = nil,
204
206
  max_priority = nil,
205
207
  prefetch: 0,
206
- prefetch_owner: nil)
208
+ prefetch_owner: nil,
209
+ forced_latency: nil)
207
210
 
208
211
  check_queue(queue)
209
212
  check_priorities(min_priority, max_priority)
@@ -217,7 +220,10 @@ module Delayed
217
220
  # jobs in a single query.
218
221
  effective_worker_names = Array(worker_names)
219
222
 
220
- target_jobs = all_available(queue, min_priority, max_priority).
223
+ target_jobs = all_available(queue,
224
+ min_priority,
225
+ max_priority,
226
+ forced_latency: forced_latency).
221
227
  limit(effective_worker_names.length + prefetch).
222
228
  lock
223
229
  jobs_with_row_number = all.from(target_jobs).
@@ -295,14 +301,15 @@ module Delayed
295
301
 
296
302
  def self.all_available(queue = Delayed::Settings.queue,
297
303
  min_priority = nil,
298
- max_priority = nil)
304
+ max_priority = nil,
305
+ forced_latency: nil)
299
306
  min_priority ||= Delayed::MIN_PRIORITY
300
307
  max_priority ||= Delayed::MAX_PRIORITY
301
308
 
302
309
  check_queue(queue)
303
310
  check_priorities(min_priority, max_priority)
304
311
 
305
- self.ready_to_run.
312
+ self.ready_to_run(forced_latency: forced_latency).
306
313
  where(:priority => min_priority..max_priority, :queue => queue).
307
314
  by_priority
308
315
  end
@@ -223,7 +223,8 @@ class Job
223
223
  min_priority = Delayed::MIN_PRIORITY,
224
224
  max_priority = Delayed::MAX_PRIORITY,
225
225
  prefetch: nil,
226
- prefetch_owner: nil)
226
+ prefetch_owner: nil,
227
+ forced_latency: nil)
227
228
 
228
229
  check_queue(queue)
229
230
  check_priorities(min_priority, max_priority)
@@ -234,7 +235,9 @@ class Job
234
235
 
235
236
  # as an optimization this lua function returns the hash of job attributes,
236
237
  # rather than just a job id, saving a round trip
237
- job_attrs = functions.get_and_lock_next_available(worker_name, queue, min_priority, max_priority, db_time_now)
238
+ now = db_time_now
239
+ now -= forced_latency if forced_latency
240
+ job_attrs = functions.get_and_lock_next_available(worker_name, queue, min_priority, max_priority, now)
238
241
  job = instantiate_from_attrs(job_attrs) # will return nil if the attrs are blank
239
242
  if multiple_workers
240
243
  if job.nil?
@@ -11,6 +11,7 @@ module Delayed
11
11
  :perform => [:worker, :job],
12
12
  :pop => [:worker],
13
13
  :work_queue_pop => [:work_queue, :worker_config],
14
+ :check_for_work => [:work_queue],
14
15
  }
15
16
 
16
17
  def initialize
@@ -16,12 +16,18 @@ module Delayed
16
16
  if using_active_record? && !ActiveRecord::Base.connected?
17
17
  ActiveRecord::Base.establish_connection(ENV['DATABASE_URL'])
18
18
  end
19
+
20
+ @allow_update = args.length > 0 && args[0][:update]
19
21
  end
20
22
 
21
23
  def using_active_record?
22
24
  Delayed::Job == Delayed::Backend::ActiveRecord::Job
23
25
  end
24
26
 
27
+ def allow_update
28
+ @allow_update
29
+ end
30
+
25
31
  # Ensure we're connected to the DB before processing the request
26
32
  before do
27
33
  if ActiveRecord::Base.respond_to?(:verify_active_connections!) && using_active_record?
@@ -100,6 +106,19 @@ module Delayed
100
106
  })
101
107
  end
102
108
 
109
+ post '/bulk_update' do
110
+ content_type :json
111
+
112
+ halt 403 unless @allow_update
113
+
114
+ payload = JSON.parse(request.body.read).symbolize_keys
115
+ Delayed::Job.bulk_update(payload[:action], { ids: payload[:ids] })
116
+
117
+ json({
118
+ success: true
119
+ })
120
+ end
121
+
103
122
  private
104
123
 
105
124
  def extract_page_size
@@ -20,6 +20,7 @@ module Delayed
20
20
  running: url_path('running'),
21
21
  tags: url_path('tags'),
22
22
  jobs: url_path('jobs'),
23
+ bulkUpdate: url_path('bulk_update'),
23
24
  }
24
25
  }.to_json
25
26
  end
@@ -97,7 +97,8 @@
97
97
  {"data": "priority"},
98
98
  {"data": "strand"},
99
99
  {"data": "run_at"}
100
- ]
100
+ ],
101
+ select: true
101
102
  });
102
103
 
103
104
  $('body').on('click', '.refresh_jobs_link', function(event) {
@@ -106,6 +107,53 @@
106
107
  return true
107
108
  });
108
109
 
110
+ function bulkUpdate(action) {
111
+ var selectedRows = jobsTable.rows( { selected: true } );
112
+ var n = selectedRows.count();
113
+ if(action == 'destroy') {
114
+ if(!confirm("Are you sure you want to delete " + n + " jobs?")) {
115
+ return;
116
+ }
117
+ }
118
+ var itemIds = [];
119
+ var i;
120
+ for (i = 0; i < n; ++i) {
121
+ itemIds.push(selectedRows.data()[i].id);
122
+ }
123
+ var data = {
124
+ action: action,
125
+ items: itemIds
126
+ }
127
+ $.ajax({
128
+ type: "POST",
129
+ contentType : 'application/json',
130
+ url: ENV.Routes.bulkUpdate,
131
+ data: JSON.stringify(data),
132
+ success: function( ) {
133
+ jobsTable.rows().deselect();
134
+ jobsTable.ajax.reload();
135
+ },
136
+ });
137
+ }
138
+
139
+ $('body').on('click', '.hold_selection_link', function(event) {
140
+ event.preventDefault();
141
+ bulkUpdate('hold');
142
+ return true
143
+ });
144
+
145
+ $('body').on('click', '.unhold_selection_link', function(event) {
146
+ event.preventDefault();
147
+ bulkUpdate('unhold');
148
+ return true
149
+ });
150
+
151
+ $('body').on('click', '.delete_selection_link', function(event) {
152
+ event.preventDefault();
153
+ bulkUpdate('destroy');
154
+ return true
155
+ });
156
+
109
157
  $('body').on('change', 'select#current_jobs_flavor', function (event) {
110
158
  event.preventDefault();
111
159
  $selectBox = $(this);
@@ -60,13 +60,28 @@
60
60
  </span>
61
61
  </div>
62
62
  </div>
63
- <div class="col-md-6">
63
+ <div class="col-md-<%= allow_update ? 2 : 6 %>">
64
64
  </div>
65
65
  <div class="col-md-1">
66
66
  <a href="" class="btn btn-default pull-right refresh_jobs_link" aria-label="Refresh Jobs Table">
67
67
  <span class="glyphicon glyphicon-refresh"></span> Refresh
68
68
  </a>
69
69
  </div>
70
+ <% if allow_update %>
71
+ <div class="col-md-4">
72
+ <span>With selection: </span>
73
+ <br/>
74
+ <a href="" class="btn btn-default hold_selection_link" aria-label="Hold Selected Jobs">
75
+ <span class="glyphicon glyphicon-pause"></span> Hold
76
+ </a>
77
+ <a href="" class="btn btn-default unhold_selection_link" aria-label="Un-hold Selected Jobs">
78
+ <span class="glyphicon glyphicon-play"></span> Un-Hold
79
+ </a>
80
+ <a href="" class="btn btn-default delete_selection_link" aria-label="Delete Selected Jobs">
81
+ <span class="glyphicon glyphicon-trash"></span> Delete
82
+ </a>
83
+ </div>
84
+ <% end %>
70
85
  </div>
71
86
  </div>
72
87
 
@@ -9,12 +9,14 @@ window.ENV = <%= render_javascript_env %>
9
9
  </script>
10
10
  <script type="text/javascript" charset="utf8 "src="//code.jquery.com/jquery-2.1.3.min.js" defer></script>
11
11
  <script type="text/javascript" charset="utf8" src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js" defer></script>
12
- <script type="text/javascript" charset="utf8" src="//cdn.datatables.net/1.10.6/js/jquery.dataTables.js" defer></script>
13
- <script type="text/javascript" charset="utf8" src="//cdn.datatables.net/plug-ins/1.10.6/integration/bootstrap/3/dataTables.bootstrap.js" defer></script>
12
+ <script type="text/javascript" charset="utf8" src="//cdn.datatables.net/1.10.19/js/jquery.dataTables.js" defer></script>
13
+ <script type="text/javascript" charset="utf8" src="//cdn.datatables.net/select/1.2.7/js/dataTables.select.min.js" defer></script>
14
+ <script type="text/javascript" charset="utf8" src="//cdn.datatables.net/plug-ins/1.10.19/integration/bootstrap/3/dataTables.bootstrap.js" defer></script>
14
15
  <script type="text/javascript" charset="utf8" src="<%= url_path 'js/app.js' %>" defer></script>
15
16
 
16
17
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css">
17
- <link rel="stylesheet" href="//cdn.datatables.net/plug-ins/1.10.6/integration/bootstrap/3/dataTables.bootstrap.css">
18
+ <link rel="stylesheet" href="//cdn.datatables.net/plug-ins/1.10.19/integration/bootstrap/3/dataTables.bootstrap.css">
19
+ <link rel="stylesheet" href="//cdn.datatables.net/select/1.2.7/css/select.dataTables.min.css">
18
20
  <link rel="stylesheet" href="<%= url_path 'css/app.css' %>">
19
21
 
20
22
  <title>Delayed Jobs</title>
@@ -1,3 +1,3 @@
1
1
  module Delayed
2
- VERSION = "0.15.1"
2
+ VERSION = "0.15.2"
3
3
  end
@@ -59,12 +59,20 @@ class ParentProcess
59
59
 
60
60
  def run_once
61
61
  handles = @clients.keys + [@listen_socket, @self_pipe[0]]
62
+ # if we're currently idle, then force a "latency" to job fetching - don't
63
+ # fetch recently queued jobs, allowing busier workers to fetch them first.
64
+ # if they're not keeping up, the jobs will slip back in time, and suddenly we'll become
65
+ # active and quickly pick up all the jobs we can. The latency is calculated to ensure that
66
+ # an active worker is guaranteed to have attempted to fetch new jobs in the meantime
67
+ forced_latency = Settings.sleep_delay + Settings.sleep_delay_stagger * 2 if all_workers_idle?
62
68
  timeout = Settings.sleep_delay + (rand * Settings.sleep_delay_stagger)
63
69
  readable, _, _ = IO.select(handles, nil, nil, timeout)
64
70
  if readable
65
71
  readable.each { |s| handle_read(s) }
66
72
  end
67
- check_for_work
73
+ Delayed::Worker.lifecycle.run_callbacks(:check_for_work, self) do
74
+ check_for_work(forced_latency: forced_latency)
75
+ end
68
76
  unlock_timed_out_prefetched_jobs
69
77
  end
70
78
 
@@ -111,7 +119,7 @@ class ParentProcess
111
119
  drop_socket(socket)
112
120
  end
113
121
 
114
- def check_for_work
122
+ def check_for_work(forced_latency: nil)
115
123
  @waiting_clients.each do |(worker_config, workers)|
116
124
  prefetched_jobs = @prefetched_jobs[worker_config] ||= []
117
125
  logger.debug("I have #{prefetched_jobs.length} jobs for #{workers.length} waiting workers")
@@ -148,7 +156,8 @@ class ParentProcess
148
156
  worker_config[:min_priority],
149
157
  worker_config[:max_priority],
150
158
  prefetch: Settings.fetch_batch_size * (worker_config[:workers] || 1) - recipients.length,
151
- prefetch_owner: prefetch_owner)
159
+ prefetch_owner: prefetch_owner,
160
+ forced_latency: forced_latency)
152
161
  logger.debug("Fetched and locked #{response.values.flatten.size} new jobs for workers (#{response.keys.join(', ')}).")
153
162
  response.each do |(worker_name, job)|
154
163
  if worker_name == prefetch_owner
@@ -288,4 +288,11 @@ describe 'Delayed::Backed::ActiveRecord::Job' do
288
288
  expect(locked_jobs['work_queue']).to eq jobs[1..2]
289
289
  jobs.map(&:reload).map(&:locked_by).should == ['worker1', 'work_queue', 'work_queue', nil, nil]
290
290
  end
291
+
292
+
293
+ it "should not find jobs scheduled for now when we have forced latency" do
294
+ job = create_job
295
+ Delayed::Job.get_and_lock_next_available('worker', forced_latency: 60.0).should be_nil
296
+ Delayed::Job.get_and_lock_next_available('worker').should eq job
297
+ end
291
298
  end
@@ -4,8 +4,10 @@ require 'delayed/server'
4
4
  RSpec.describe Delayed::Server, sinatra: true do
5
5
  include Rack::Test::Methods
6
6
 
7
+ @update = false
8
+
7
9
  def app
8
- described_class.new
10
+ described_class.new(update: @update)
9
11
  end
10
12
 
11
13
  def parsed_body
@@ -60,4 +62,44 @@ RSpec.describe Delayed::Server, sinatra: true do
60
62
  end
61
63
  end
62
64
  end
65
+
66
+ describe "post '/bulk_update'" do
67
+ let!(:job_1) { Delayed::Job.enqueue(SimpleJob.new, strand: 'strand-1') }
68
+ let!(:job_2) { Delayed::Job.enqueue(SimpleJob.new, strand: 'strand-2') }
69
+ let!(:job_3) { Delayed::Job.enqueue(SimpleJob.new, strand: 'strand-3') }
70
+
71
+ context 'with update enabled' do
72
+ before do
73
+ @update = true
74
+ post "/bulk_update", params=JSON.generate(action: 'destroy', ids: [job_1.id])
75
+ end
76
+
77
+ it 'must remove job_1' do
78
+ expect{ Delayed::Job.find(job_1.id) }.to raise_error(ActiveRecord::RecordNotFound)
79
+ expect(Delayed::Job.find(job_2.id)).to_not be_nil
80
+ expect(Delayed::Job.find(job_3.id)).to_not be_nil
81
+ end
82
+
83
+ it 'must return ok' do
84
+ expect(last_response.ok?).to be true
85
+ end
86
+ end
87
+
88
+ context 'with update disabled' do
89
+ before do
90
+ @update = false
91
+ post "/bulk_update", params=JSON.generate(action: 'destroy', ids: [job_1.id])
92
+ end
93
+
94
+ it 'must not remove job_1' do
95
+ expect(Delayed::Job.find(job_1.id)).to_not be_nil
96
+ expect(Delayed::Job.find(job_2.id)).to_not be_nil
97
+ expect(Delayed::Job.find(job_3.id)).to_not be_nil
98
+ end
99
+
100
+ it 'must return forbidden' do
101
+ expect(last_response.forbidden?).to be true
102
+ end
103
+ end
104
+ end
63
105
  end
@@ -77,7 +77,7 @@ RSpec.describe Delayed::WorkQueue::ParentProcess::Server do
77
77
  subject.run_once
78
78
 
79
79
  allow(subject).to receive(:prefetch_owner).and_return('work_queue:X')
80
- job_args = [["worker_name1"], "queue_name", 1, 2, prefetch: 4, prefetch_owner: 'work_queue:X']
80
+ job_args = [["worker_name1"], "queue_name", 1, 2, prefetch: 4, prefetch_owner: 'work_queue:X', forced_latency: 6.0]
81
81
  job2 = Delayed::Job.new(:tag => 'tag')
82
82
  job2.create_and_lock!('work_queue:X')
83
83
  job3 = Delayed::Job.new(:tag => 'tag')
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ../..
3
3
  specs:
4
- inst-jobs (0.14.6)
4
+ inst-jobs (0.15.1)
5
5
  activerecord (>= 4.2)
6
6
  activesupport (>= 4.2)
7
7
  after_transaction_commit (>= 1.0, < 3)
@@ -61,7 +61,7 @@ GEM
61
61
  database_cleaner (1.6.1)
62
62
  diff-lcs (1.3)
63
63
  erubis (2.7.0)
64
- et-orbi (1.1.2)
64
+ et-orbi (1.1.4)
65
65
  tzinfo
66
66
  globalid (0.4.0)
67
67
  activesupport (>= 4.2.0)
@@ -119,7 +119,7 @@ GEM
119
119
  rake (>= 0.8.7)
120
120
  thor (>= 0.18.1, < 2.0)
121
121
  rake (12.0.0)
122
- redis (4.0.1)
122
+ redis (4.0.2)
123
123
  redis-scripting (1.0.1)
124
124
  redis (>= 3.0)
125
125
  rspec (3.4.0)
@@ -1,120 +1,129 @@
1
1
  PATH
2
2
  remote: ../..
3
3
  specs:
4
- inst-jobs (0.13.3)
5
- after_transaction_commit (~> 1.0)
6
- rails (>= 4.2)
4
+ inst-jobs (0.15.1)
5
+ activerecord (>= 4.2)
6
+ activesupport (>= 4.2)
7
+ after_transaction_commit (>= 1.0, < 3)
8
+ railties (>= 4.2)
7
9
  redis (> 3.0)
8
10
  redis-scripting (~> 1.0.1)
9
- rufus-scheduler (~> 3.4)
11
+ rufus-scheduler (~> 3.4, < 3.5)
10
12
 
11
13
  GEM
12
14
  remote: https://rubygems.org/
13
15
  specs:
14
- actioncable (5.1.1)
15
- actionpack (= 5.1.1)
16
+ actioncable (5.1.6)
17
+ actionpack (= 5.1.6)
16
18
  nio4r (~> 2.0)
17
19
  websocket-driver (~> 0.6.1)
18
- actionmailer (5.1.1)
19
- actionpack (= 5.1.1)
20
- actionview (= 5.1.1)
21
- activejob (= 5.1.1)
20
+ actionmailer (5.1.6)
21
+ actionpack (= 5.1.6)
22
+ actionview (= 5.1.6)
23
+ activejob (= 5.1.6)
22
24
  mail (~> 2.5, >= 2.5.4)
23
25
  rails-dom-testing (~> 2.0)
24
- actionpack (5.1.1)
25
- actionview (= 5.1.1)
26
- activesupport (= 5.1.1)
26
+ actionpack (5.1.6)
27
+ actionview (= 5.1.6)
28
+ activesupport (= 5.1.6)
27
29
  rack (~> 2.0)
28
- rack-test (~> 0.6.3)
30
+ rack-test (>= 0.6.3)
29
31
  rails-dom-testing (~> 2.0)
30
32
  rails-html-sanitizer (~> 1.0, >= 1.0.2)
31
- actionview (5.1.1)
32
- activesupport (= 5.1.1)
33
+ actionview (5.1.6)
34
+ activesupport (= 5.1.6)
33
35
  builder (~> 3.1)
34
36
  erubi (~> 1.4)
35
37
  rails-dom-testing (~> 2.0)
36
38
  rails-html-sanitizer (~> 1.0, >= 1.0.3)
37
- activejob (5.1.1)
38
- activesupport (= 5.1.1)
39
+ activejob (5.1.6)
40
+ activesupport (= 5.1.6)
39
41
  globalid (>= 0.3.6)
40
- activemodel (5.1.1)
41
- activesupport (= 5.1.1)
42
- activerecord (5.1.1)
43
- activemodel (= 5.1.1)
44
- activesupport (= 5.1.1)
42
+ activemodel (5.1.6)
43
+ activesupport (= 5.1.6)
44
+ activerecord (5.1.6)
45
+ activemodel (= 5.1.6)
46
+ activesupport (= 5.1.6)
45
47
  arel (~> 8.0)
46
- activesupport (5.1.1)
48
+ activesupport (5.1.6)
47
49
  concurrent-ruby (~> 1.0, >= 1.0.2)
48
- i18n (~> 0.7)
50
+ i18n (>= 0.7, < 2)
49
51
  minitest (~> 5.1)
50
52
  tzinfo (~> 1.1)
51
- after_transaction_commit (1.1.2)
52
- activerecord (>= 4.0)
53
+ addressable (2.5.2)
54
+ public_suffix (>= 2.0.2, < 4.0)
55
+ after_transaction_commit (2.0.0)
56
+ activerecord (>= 5.0)
53
57
  arel (8.0.0)
54
- backports (3.7.0)
58
+ backports (3.11.3)
55
59
  builder (3.2.3)
56
- bump (0.5.3)
57
- byebug (9.0.6)
58
- coderay (1.1.1)
60
+ bump (0.6.1)
61
+ byebug (10.0.2)
62
+ coderay (1.1.2)
59
63
  concurrent-ruby (1.0.5)
64
+ crass (1.0.4)
60
65
  database_cleaner (1.6.1)
61
66
  diff-lcs (1.3)
62
- erubi (1.6.0)
63
- et-orbi (1.0.3)
67
+ erubi (1.7.1)
68
+ et-orbi (1.1.4)
64
69
  tzinfo
65
- globalid (0.4.0)
70
+ globalid (0.4.1)
66
71
  activesupport (>= 4.2.0)
67
- i18n (0.8.4)
68
- loofah (2.0.3)
72
+ httpclient (2.8.3)
73
+ i18n (1.1.0)
74
+ concurrent-ruby (~> 1.0)
75
+ imperium (0.5.0)
76
+ addressable (~> 2.5.0)
77
+ httpclient (~> 2.8)
78
+ loofah (2.2.2)
79
+ crass (~> 1.0.2)
69
80
  nokogiri (>= 1.5.9)
70
- mail (2.6.6)
71
- mime-types (>= 1.16, < 4)
72
- method_source (0.8.2)
73
- mime-types (3.1)
74
- mime-types-data (~> 3.2015)
75
- mime-types-data (3.2016.0521)
76
- mini_portile2 (2.2.0)
77
- minitest (5.10.2)
78
- multi_json (1.12.1)
81
+ mail (2.7.0)
82
+ mini_mime (>= 0.1.1)
83
+ method_source (0.9.0)
84
+ mini_mime (1.0.1)
85
+ mini_portile2 (2.3.0)
86
+ minitest (5.11.3)
87
+ multi_json (1.13.1)
79
88
  mustermann (1.0.0.beta2)
80
- nio4r (2.1.0)
81
- nokogiri (1.8.0)
82
- mini_portile2 (~> 2.2.0)
89
+ nio4r (2.3.1)
90
+ nokogiri (1.8.4)
91
+ mini_portile2 (~> 2.3.0)
83
92
  pg (0.21.0)
84
- pry (0.10.4)
93
+ pry (0.11.3)
85
94
  coderay (~> 1.1.0)
86
- method_source (~> 0.8.1)
87
- slop (~> 3.4)
88
- rack (2.0.3)
95
+ method_source (~> 0.9.0)
96
+ public_suffix (3.0.3)
97
+ rack (2.0.5)
89
98
  rack-protection (2.0.0.beta2)
90
99
  rack
91
- rack-test (0.6.3)
92
- rack (>= 1.0)
93
- rails (5.1.1)
94
- actioncable (= 5.1.1)
95
- actionmailer (= 5.1.1)
96
- actionpack (= 5.1.1)
97
- actionview (= 5.1.1)
98
- activejob (= 5.1.1)
99
- activemodel (= 5.1.1)
100
- activerecord (= 5.1.1)
101
- activesupport (= 5.1.1)
102
- bundler (>= 1.3.0, < 2.0)
103
- railties (= 5.1.1)
100
+ rack-test (1.1.0)
101
+ rack (>= 1.0, < 3)
102
+ rails (5.1.6)
103
+ actioncable (= 5.1.6)
104
+ actionmailer (= 5.1.6)
105
+ actionpack (= 5.1.6)
106
+ actionview (= 5.1.6)
107
+ activejob (= 5.1.6)
108
+ activemodel (= 5.1.6)
109
+ activerecord (= 5.1.6)
110
+ activesupport (= 5.1.6)
111
+ bundler (>= 1.3.0)
112
+ railties (= 5.1.6)
104
113
  sprockets-rails (>= 2.0.0)
105
114
  rails-dom-testing (2.0.3)
106
115
  activesupport (>= 4.2.0)
107
116
  nokogiri (>= 1.6)
108
- rails-html-sanitizer (1.0.3)
109
- loofah (~> 2.0)
110
- railties (5.1.1)
111
- actionpack (= 5.1.1)
112
- activesupport (= 5.1.1)
117
+ rails-html-sanitizer (1.0.4)
118
+ loofah (~> 2.2, >= 2.2.2)
119
+ railties (5.1.6)
120
+ actionpack (= 5.1.6)
121
+ activesupport (= 5.1.6)
113
122
  method_source
114
123
  rake (>= 0.8.7)
115
124
  thor (>= 0.18.1, < 2.0)
116
- rake (12.0.0)
117
- redis (3.3.3)
125
+ rake (12.3.1)
126
+ redis (4.0.2)
118
127
  redis-scripting (1.0.1)
119
128
  redis (>= 3.0)
120
129
  rspec (3.4.0)
@@ -130,7 +139,7 @@ GEM
130
139
  diff-lcs (>= 1.2.0, < 2.0)
131
140
  rspec-support (~> 3.4.0)
132
141
  rspec-support (3.4.1)
133
- rufus-scheduler (3.4.0)
142
+ rufus-scheduler (3.4.2)
134
143
  et-orbi (~> 1.0)
135
144
  sinatra (2.0.0.beta2)
136
145
  mustermann (= 1.0.0.beta2)
@@ -145,23 +154,22 @@ GEM
145
154
  rack-test
146
155
  sinatra (= 2.0.0.beta2)
147
156
  tilt (>= 1.3, < 3)
148
- slop (3.6.0)
149
- sprockets (3.7.1)
157
+ sprockets (3.7.2)
150
158
  concurrent-ruby (~> 1.0)
151
159
  rack (> 1, < 3)
152
- sprockets-rails (3.2.0)
160
+ sprockets-rails (3.2.1)
153
161
  actionpack (>= 4.0)
154
162
  activesupport (>= 4.0)
155
163
  sprockets (>= 3.0.0)
156
- thor (0.19.4)
164
+ thor (0.20.0)
157
165
  thread_safe (0.3.6)
158
- tilt (2.0.7)
166
+ tilt (2.0.8)
159
167
  timecop (0.7.1)
160
- tzinfo (1.2.3)
168
+ tzinfo (1.2.5)
161
169
  thread_safe (~> 0.1)
162
170
  websocket-driver (0.6.5)
163
171
  websocket-extensions (>= 0.1.0)
164
- websocket-extensions (0.1.2)
172
+ websocket-extensions (0.1.3)
165
173
  wwtd (1.3.0)
166
174
 
167
175
  PLATFORMS
@@ -171,8 +179,9 @@ DEPENDENCIES
171
179
  bump
172
180
  byebug
173
181
  database_cleaner (= 1.6.1)
182
+ imperium (>= 0.2.3)
174
183
  inst-jobs!
175
- pg
184
+ pg (< 1.0)
176
185
  pry
177
186
  rack-test
178
187
  rails (~> 5.1.0)
@@ -184,4 +193,4 @@ DEPENDENCIES
184
193
  wwtd (~> 1.3.0)
185
194
 
186
195
  BUNDLED WITH
187
- 1.14.6
196
+ 1.16.1
@@ -13,6 +13,10 @@ shared_examples_for 'Delayed::Worker' do
13
13
  Delayed::Settings.sleep_delay = ->{ 0.01 }
14
14
  end
15
15
 
16
+ after do
17
+ Delayed::Settings.sleep_delay = 2.0
18
+ end
19
+
16
20
  describe "running a job" do
17
21
  it "should not fail when running a job with a % in the name" do
18
22
  @job = "Some % Name here".send_later_enqueue_args(:starts_with?, { no_delay: true }, "Some % Name")
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.1
4
+ version: 0.15.2
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-08-08 00:00:00.000000000 Z
12
+ date: 2018-08-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activerecord