canvas-jobs 0.10.1 → 0.10.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: 5eeb8774ac009f2e6c53093cf82ad1ed3ac85bab
4
- data.tar.gz: c2e16d6578393eb261547f0d1d9dc7fa41b70ba9
3
+ metadata.gz: 5f0f7a704ab25af4fe3265b40f88d83915892cdf
4
+ data.tar.gz: 2d7d88d8ace4f4b37bb5e89b8c0974fe21c592d0
5
5
  SHA512:
6
- metadata.gz: 9ece99cdf52b6ca126492578f7c097f7f9ad3aec06949dc705677c4cfa3839d0d9e8d0515cb8ab55b2c76c0a6ff66d49b700bfdef2ffa5e57525d03cd1d9484d
7
- data.tar.gz: 6da19736ac6fe05214ddd4f23fad4c1d0ee6d4b6459e9858c281f8a8b6f08fa8d7cb48a29c904276c442eb707a7e04371e6628159edc54d2453333ef3073752a
6
+ metadata.gz: d0c954cee81c2f914c820599e592e8357990077d8056bf9e4abff12f352d8f97842c55ac33ef88c85f3fac11162603ef9191d6c8096e1861f5eec9fd62f09175
7
+ data.tar.gz: d0962185edbdebcb17926563d2cf335107ed2fb72553fa581f6fe2fa75ea9251b8adf3b321f8ecd11c476bb612d3416dc987044386cfdcbba0f41c6483fdf681
@@ -0,0 +1,15 @@
1
+ class AddExpiresAtToJobs < ActiveRecord::Migration
2
+ def connection
3
+ Delayed::Job.connection
4
+ end
5
+
6
+ def up
7
+ add_column :delayed_jobs, :expires_at, :datetime
8
+ add_column :failed_jobs, :expires_at, :datetime
9
+ end
10
+
11
+ def down
12
+ remove_column :delayed_jobs, :expires_at
13
+ remove_column :failed_jobs, :expires_at
14
+ end
15
+ end
@@ -6,6 +6,9 @@ module Delayed
6
6
  class RecordNotFound < DeserializationError
7
7
  end
8
8
 
9
+ class JobExpired < StandardError
10
+ end
11
+
9
12
  module Base
10
13
  ON_HOLD_LOCKED_BY = 'on hold'
11
14
  ON_HOLD_COUNT = 50
@@ -145,6 +148,10 @@ module Delayed
145
148
  end
146
149
  alias_method :failed, :failed?
147
150
 
151
+ def expired?
152
+ expires_at && (self.class.db_time_now >= expires_at)
153
+ end
154
+
148
155
  # Reschedule the job in the future (when a job fails).
149
156
  # Uses an exponential scale depending on the number of failed attempts.
150
157
  def reschedule(error = nil, time = nil)
@@ -158,6 +165,8 @@ module Delayed
158
165
  self.attempts += 1
159
166
  if self.attempts >= (self.max_attempts || Delayed::Settings.max_attempts)
160
167
  permanent_failure error || "max attempts reached"
168
+ elsif expired?
169
+ permanent_failure error || "job has expired"
161
170
  else
162
171
  time ||= self.reschedule_at
163
172
  self.run_at = time
@@ -130,6 +130,7 @@ class Job
130
130
  column(:max_attempts, :integer)
131
131
  column(:strand, :string)
132
132
  column(:source, :string)
133
+ column(:expires_at, :timestamp)
133
134
 
134
135
  def initialize(attrs = {})
135
136
  attrs.each { |k, v| self.send("#{k}=", v) }
@@ -14,6 +14,8 @@ module Delayed
14
14
  end
15
15
 
16
16
  no_delay = enqueue_args.delete(:no_delay)
17
+ on_failure = enqueue_args.delete(:on_failure)
18
+ on_permanent_failure = enqueue_args.delete(:on_permanent_failure)
17
19
  if !no_delay
18
20
  # delay queuing up the job in another database until the results of the current
19
21
  # transaction are visible
@@ -23,13 +25,15 @@ module Delayed
23
25
 
24
26
  if (Delayed::Job != Delayed::Backend::ActiveRecord::Job || connection != Delayed::Job.connection)
25
27
  connection.after_transaction_commit do
26
- Delayed::Job.enqueue(Delayed::PerformableMethod.new(self, method.to_sym, args), enqueue_args)
28
+ Delayed::Job.enqueue(Delayed::PerformableMethod.new(self, method.to_sym, args,
29
+ on_failure, on_permanent_failure), enqueue_args)
27
30
  end
28
31
  return nil
29
32
  end
30
33
  end
31
34
 
32
- result = Delayed::Job.enqueue(Delayed::PerformableMethod.new(self, method.to_sym, args), enqueue_args)
35
+ result = Delayed::Job.enqueue(Delayed::PerformableMethod.new(self, method.to_sym, args,
36
+ on_failure, on_permanent_failure), enqueue_args)
33
37
  result = nil unless no_delay
34
38
  result
35
39
  end
@@ -1,11 +1,13 @@
1
1
  module Delayed
2
- class PerformableMethod < Struct.new(:object, :method, :args)
3
- def initialize(object, method, args = [])
2
+ class PerformableMethod < Struct.new(:object, :method, :args, :fail_cb, :permanent_fail_cb)
3
+ def initialize(object, method, args = [], fail_cb = nil, permanent_fail_cb = nil)
4
4
  raise NoMethodError, "undefined method `#{method}' for #{object.inspect}" unless object.respond_to?(method, true)
5
5
 
6
6
  self.object = object
7
7
  self.args = args
8
8
  self.method = method.to_sym
9
+ self.fail_cb = fail_cb
10
+ self.permanent_fail_cb = permanent_fail_cb
9
11
  end
10
12
 
11
13
  def display_name
@@ -21,6 +23,14 @@ module Delayed
21
23
  object.send(method, *args)
22
24
  end
23
25
 
26
+ def on_failure(error)
27
+ object.send(fail_cb, error) if fail_cb
28
+ end
29
+
30
+ def on_permanent_failure(error)
31
+ object.send(permanent_fail_cb, error) if permanent_fail_cb
32
+ end
33
+
24
34
  def deep_de_ar_ize(arg)
25
35
  case arg
26
36
  when Hash
@@ -1,3 +1,3 @@
1
1
  module Delayed
2
- VERSION = "0.10.1"
2
+ VERSION = "0.10.2"
3
3
  end
@@ -130,6 +130,7 @@ class Worker
130
130
 
131
131
  def perform(job)
132
132
  count = 1
133
+ raise Delayed::Backend::JobExpired, "job expired at #{job.expires_at}" if job.expired?
133
134
  self.class.lifecycle.run_callbacks(:perform, self, job) do
134
135
  set_process_name("run:#{Settings.worker_procname_prefix}#{job.id}:#{job.name}")
135
136
  say("Processing #{log_job(job, :long)}", :info)
@@ -1,22 +1,22 @@
1
1
  PATH
2
2
  remote: ../../
3
3
  specs:
4
- canvas-jobs (0.9.11)
5
- activerecord (>= 3.2)
4
+ canvas-jobs (0.9.14)
6
5
  after_transaction_commit (= 1.0.1)
6
+ rails (>= 3.2)
7
7
  redis (> 3.0)
8
- redis-scripting (= 1.0.1)
9
- rufus-scheduler (= 2.0.6)
8
+ redis-scripting (~> 1.0.1)
9
+ rufus-scheduler (~> 3.1.2)
10
10
 
11
11
  GEM
12
12
  remote: https://rubygems.org/
13
13
  specs:
14
- actionmailer (3.2.19)
15
- actionpack (= 3.2.19)
14
+ actionmailer (3.2.22)
15
+ actionpack (= 3.2.22)
16
16
  mail (~> 2.5.4)
17
- actionpack (3.2.19)
18
- activemodel (= 3.2.19)
19
- activesupport (= 3.2.19)
17
+ actionpack (3.2.22)
18
+ activemodel (= 3.2.22)
19
+ activesupport (= 3.2.22)
20
20
  builder (~> 3.0.0)
21
21
  erubis (~> 2.7.0)
22
22
  journey (~> 1.0.4)
@@ -24,93 +24,107 @@ GEM
24
24
  rack-cache (~> 1.2)
25
25
  rack-test (~> 0.6.1)
26
26
  sprockets (~> 2.2.1)
27
- activemodel (3.2.19)
28
- activesupport (= 3.2.19)
27
+ activemodel (3.2.22)
28
+ activesupport (= 3.2.22)
29
29
  builder (~> 3.0.0)
30
- activerecord (3.2.19)
31
- activemodel (= 3.2.19)
32
- activesupport (= 3.2.19)
30
+ activerecord (3.2.22)
31
+ activemodel (= 3.2.22)
32
+ activesupport (= 3.2.22)
33
33
  arel (~> 3.0.2)
34
34
  tzinfo (~> 0.3.29)
35
- activeresource (3.2.19)
36
- activemodel (= 3.2.19)
37
- activesupport (= 3.2.19)
38
- activesupport (3.2.19)
35
+ activeresource (3.2.22)
36
+ activemodel (= 3.2.22)
37
+ activesupport (= 3.2.22)
38
+ activesupport (3.2.22)
39
39
  i18n (~> 0.6, >= 0.6.4)
40
40
  multi_json (~> 1.0)
41
41
  after_transaction_commit (1.0.1)
42
42
  activerecord (>= 3.2)
43
43
  arel (3.0.3)
44
+ backports (3.6.6)
44
45
  builder (3.0.4)
45
- bump (0.5.0)
46
+ bump (0.5.2)
46
47
  coderay (1.1.0)
47
48
  database_cleaner (1.3.0)
48
49
  diff-lcs (1.2.5)
49
50
  erubis (2.7.0)
50
51
  hike (1.2.3)
51
- i18n (0.6.11)
52
+ i18n (0.7.0)
52
53
  journey (1.0.4)
53
- json (1.8.1)
54
+ json (1.8.3)
54
55
  mail (2.5.4)
55
56
  mime-types (~> 1.16)
56
57
  treetop (~> 1.4.8)
57
58
  method_source (0.8.2)
58
59
  mime-types (1.25.1)
59
- multi_json (1.10.1)
60
- pg (0.17.1)
60
+ multi_json (1.11.2)
61
+ pg (0.18.2)
61
62
  polyglot (0.3.5)
62
63
  pry (0.10.1)
63
64
  coderay (~> 1.1.0)
64
65
  method_source (~> 0.8.1)
65
66
  slop (~> 3.4)
66
- rack (1.4.5)
67
+ rack (1.4.7)
67
68
  rack-cache (1.2)
68
69
  rack (>= 0.4)
70
+ rack-protection (1.5.3)
71
+ rack
69
72
  rack-ssl (1.3.4)
70
73
  rack
71
- rack-test (0.6.2)
74
+ rack-test (0.6.3)
72
75
  rack (>= 1.0)
73
- rails (3.2.19)
74
- actionmailer (= 3.2.19)
75
- actionpack (= 3.2.19)
76
- activerecord (= 3.2.19)
77
- activeresource (= 3.2.19)
78
- activesupport (= 3.2.19)
76
+ rails (3.2.22)
77
+ actionmailer (= 3.2.22)
78
+ actionpack (= 3.2.22)
79
+ activerecord (= 3.2.22)
80
+ activeresource (= 3.2.22)
81
+ activesupport (= 3.2.22)
79
82
  bundler (~> 1.0)
80
- railties (= 3.2.19)
81
- railties (3.2.19)
82
- actionpack (= 3.2.19)
83
- activesupport (= 3.2.19)
83
+ railties (= 3.2.22)
84
+ railties (3.2.22)
85
+ actionpack (= 3.2.22)
86
+ activesupport (= 3.2.22)
84
87
  rack-ssl (~> 1.3.2)
85
88
  rake (>= 0.8.7)
86
89
  rdoc (~> 3.4)
87
90
  thor (>= 0.14.6, < 2.0)
88
- rake (10.3.2)
91
+ rake (10.4.2)
89
92
  rdoc (3.12.2)
90
93
  json (~> 1.4)
91
- redis (3.1.0)
94
+ redis (3.2.1)
92
95
  redis-scripting (1.0.1)
93
96
  redis (>= 3.0)
94
97
  rspec (3.1.0)
95
98
  rspec-core (~> 3.1.0)
96
99
  rspec-expectations (~> 3.1.0)
97
100
  rspec-mocks (~> 3.1.0)
98
- rspec-core (3.1.5)
101
+ rspec-core (3.1.7)
99
102
  rspec-support (~> 3.1.0)
100
103
  rspec-expectations (3.1.2)
101
104
  diff-lcs (>= 1.2.0, < 2.0)
102
105
  rspec-support (~> 3.1.0)
103
- rspec-mocks (3.1.2)
106
+ rspec-mocks (3.1.3)
104
107
  rspec-support (~> 3.1.0)
105
- rspec-support (3.1.1)
106
- rufus-scheduler (2.0.6)
108
+ rspec-support (3.1.2)
109
+ rufus-scheduler (3.1.3)
110
+ sinatra (1.4.6)
111
+ rack (~> 1.4)
112
+ rack-protection (~> 1.4)
113
+ tilt (>= 1.3, < 3)
114
+ sinatra-contrib (1.4.6)
115
+ backports (>= 2.0)
116
+ multi_json
117
+ rack-protection
118
+ rack-test
119
+ sinatra (~> 1.4.0)
120
+ tilt (>= 1.3, < 3)
107
121
  slop (3.6.0)
108
- sprockets (2.2.2)
122
+ sprockets (2.2.3)
109
123
  hike (~> 1.2)
110
124
  multi_json (~> 1.0)
111
125
  rack (~> 1.0)
112
126
  tilt (~> 1.1, != 1.3.0)
113
- test_after_commit (0.4.0)
127
+ test_after_commit (0.4.1)
114
128
  activerecord (>= 3.2)
115
129
  thor (0.19.1)
116
130
  tilt (1.4.1)
@@ -118,7 +132,7 @@ GEM
118
132
  treetop (1.4.15)
119
133
  polyglot
120
134
  polyglot (>= 0.3.1)
121
- tzinfo (0.3.41)
135
+ tzinfo (0.3.44)
122
136
  wwtd (0.7.0)
123
137
 
124
138
  PLATFORMS
@@ -130,9 +144,12 @@ DEPENDENCIES
130
144
  database_cleaner (= 1.3.0)
131
145
  pg
132
146
  pry
147
+ rack-test
133
148
  rails (~> 3.2.19)
134
149
  rake
135
150
  rspec (= 3.1.0)
136
- test_after_commit (= 0.4.0)
151
+ sinatra
152
+ sinatra-contrib
153
+ test_after_commit (= 0.4.1)
137
154
  timecop (= 0.7.1)
138
155
  wwtd (= 0.7.0)
@@ -7,11 +7,13 @@ class ErrorJob
7
7
  cattr_accessor :runs; self.runs = 0
8
8
  def perform; raise 'did not work'; end
9
9
 
10
+ cattr_accessor :last_error; self.last_error = nil
11
+
10
12
  cattr_accessor :failure_runs; self.failure_runs = 0
11
- def on_failure(error); @@failure_runs += 1; end
13
+ def on_failure(error); @@last_error = error; @@failure_runs += 1; end
12
14
 
13
15
  cattr_accessor :permanent_failure_runs; self.permanent_failure_runs = 0
14
- def on_permanent_failure(error); @@permanent_failure_runs += 1; end
16
+ def on_permanent_failure(error); @@last_error = error; @@permanent_failure_runs += 1; end
15
17
  end
16
18
 
17
19
  class LongRunningJob
@@ -71,16 +71,16 @@ shared_examples_for 'random ruby objects' do
71
71
  end
72
72
  obj = TestObject.new
73
73
  method = double()
74
- expect(Delayed::PerformableMethod).to receive(:new).with(obj, :test_method_without_send_later, [1,2,3]).and_return(method)
74
+ expect(Delayed::PerformableMethod).to receive(:new).with(obj, :test_method_without_send_later, [1,2,3], nil, nil).and_return(method)
75
75
  expect(Delayed::Job).to receive(:enqueue).with(method, :enqueue_arg_1 => :thing)
76
76
  obj.test_method(1,2,3)
77
- expect(Delayed::PerformableMethod).to receive(:new).with(obj, :test_method_without_send_later, [4]).and_return(method)
77
+ expect(Delayed::PerformableMethod).to receive(:new).with(obj, :test_method_without_send_later, [4], nil, nil).and_return(method)
78
78
  expect(Delayed::Job).to receive(:enqueue).with(method, :enqueue_arg_1 => :thing)
79
79
  obj.test_method(4)
80
- expect(Delayed::PerformableMethod).to receive(:new).with(obj, :test_method_without_send_later, [6]).and_return(method)
80
+ expect(Delayed::PerformableMethod).to receive(:new).with(obj, :test_method_without_send_later, [6], nil, nil).and_return(method)
81
81
  expect(Delayed::Job).to receive(:enqueue).with(method, :enqueue_arg_1 => :thing)
82
82
  obj.test_method_with_send_later(6)
83
- expect(Delayed::PerformableMethod).to receive(:new).with(obj, :test_method_without_send_later, [5,6]).and_return(method)
83
+ expect(Delayed::PerformableMethod).to receive(:new).with(obj, :test_method_without_send_later, [5,6], nil, nil).and_return(method)
84
84
  expect(Delayed::Job).to receive(:enqueue).with(method, :enqueue_arg_1 => :thing)
85
85
  obj.test_method_with_send_later(5,6)
86
86
  obj.ran.should be_nil
@@ -96,14 +96,14 @@ shared_examples_for 'random ruby objects' do
96
96
  class TestObject
97
97
  attr_reader :ran
98
98
  def test_method(*args); @ran = args; end
99
- add_send_later_methods(:test_method, {:enqueue_arg_2 => :thing2}, false)
99
+ add_send_later_methods(:test_method, {:enqueue_arg_2 => :thing2, :on_failure => :fail, :on_permanent_failure => :fail_frd}, false)
100
100
  end
101
101
  obj = TestObject.new
102
102
  method = double()
103
- expect(Delayed::PerformableMethod).to receive(:new).with(obj, :test_method_without_send_later, [6]).and_return(method)
103
+ expect(Delayed::PerformableMethod).to receive(:new).with(obj, :test_method_without_send_later, [6], :fail, :fail_frd).and_return(method)
104
104
  expect(Delayed::Job).to receive(:enqueue).with(method, :enqueue_arg_2 => :thing2)
105
105
  obj.test_method_with_send_later(6)
106
- expect(Delayed::PerformableMethod).to receive(:new).with(obj, :test_method_without_send_later, [5,6]).and_return(method)
106
+ expect(Delayed::PerformableMethod).to receive(:new).with(obj, :test_method_without_send_later, [5,6], :fail, :fail_frd).and_return(method)
107
107
  expect(Delayed::Job).to receive(:enqueue).with(method, :enqueue_arg_2 => :thing2)
108
108
  obj.test_method_with_send_later(5,6)
109
109
  obj.ran.should be_nil
@@ -49,4 +49,18 @@ shared_examples_for 'Delayed::PerformableMethod' do
49
49
  p = Delayed::PerformableMethod.new(reader, :read, [['arg1', story, { [:key, 1] => story }]])
50
50
  p.full_name.should == "StoryReader#read([\"arg1\", Story.find(#{story.id}), {[:key, 1] => Story.find(#{story.id})}])"
51
51
  end
52
+
53
+ it "should call the on_failure callback" do
54
+ story = Story.create :text => 'wat'
55
+ p = Delayed::PerformableMethod.new(story, :tell, [], :text=)
56
+ p.send(:on_failure, 'fail')
57
+ story.text.should == 'fail'
58
+ end
59
+
60
+ it "should call the on_permanent_failure callback" do
61
+ story = Story.create :text => 'wat'
62
+ p = Delayed::PerformableMethod.new(story, :tell, [], nil, :text=)
63
+ p.send(:on_permanent_failure, 'fail_frd')
64
+ story.text.should == 'fail_frd'
65
+ end
52
66
  end
@@ -46,6 +46,12 @@ shared_examples_for 'a backend' do
46
46
  @job.run_at.should be_within(1).of(later)
47
47
  end
48
48
 
49
+ it "should be able to set expires_at when enqueuing items" do
50
+ later = Delayed::Job.db_time_now + 1.day
51
+ @job = Delayed::Job.enqueue SimpleJob.new, :expires_at => later
52
+ @job.expires_at.should be_within(1).of(later)
53
+ end
54
+
49
55
  it "should work with jobs in modules" do
50
56
  M::ModuleJob.runs = 0
51
57
  job = Delayed::Job.enqueue M::ModuleJob.new
@@ -198,6 +198,12 @@ shared_examples_for 'Delayed::Worker' do
198
198
  @job.save!
199
199
  2.times { @job.reschedule }
200
200
  end
201
+
202
+ it "should be destroyed if it has expired" do
203
+ job = Delayed::Job.create :payload_object => SimpleJob.new, :expires_at => Delayed::Job.db_time_now - 1.day
204
+ expect(job).to receive(:destroy)
205
+ job.reschedule
206
+ end
201
207
  end
202
208
 
203
209
  context "and we don't want to destroy jobs" do
@@ -220,7 +226,12 @@ shared_examples_for 'Delayed::Worker' do
220
226
  @job = Delayed::Job.find(@job.id)
221
227
  @job.failed_at.should == nil
222
228
  end
223
-
229
+
230
+ it "should be failed if it has expired" do
231
+ job = Delayed::Job.create :payload_object => SimpleJob.new, :expires_at => Delayed::Job.db_time_now - 1.day
232
+ expect(job).to receive(:fail!)
233
+ job.reschedule
234
+ end
224
235
  end
225
236
 
226
237
  context "and we give an on_max_failures callback" do
@@ -311,4 +322,39 @@ shared_examples_for 'Delayed::Worker' do
311
322
  expect(SimpleJob.runs).to eq(1)
312
323
  end
313
324
  end
325
+
326
+ describe "expires_at" do
327
+ it "should run non-expired jobs" do
328
+ Delayed::Job.enqueue SimpleJob.new, :expires_at => Delayed::Job.db_time_now + 1.day
329
+ expect { @worker.run }.to change { SimpleJob.runs }.by(1)
330
+ end
331
+
332
+ it "should not run expired jobs" do
333
+ Delayed::Job.enqueue SimpleJob.new, :expires_at => Delayed::Job.db_time_now - 1.day
334
+ expect { @worker.run }.to change { SimpleJob.runs }.by(0)
335
+ end
336
+
337
+ it "should report a permanent failure when an expired job is dequeued" do
338
+ ErrorJob.last_error = nil
339
+ Delayed::Job.enqueue ErrorJob.new, :expires_at => Delayed::Job.db_time_now - 1.day
340
+ expect { @worker.run }.to change { ErrorJob.permanent_failure_runs }.by(1)
341
+ expect(ErrorJob.last_error).to be_a Delayed::Backend::JobExpired
342
+ end
343
+ end
344
+
345
+ describe "send_later_enqueue_args failure callbacks" do
346
+ it "should call the on_failure callback" do
347
+ ErrorJob.last_error = nil
348
+ ErrorJob.new.send_later_enqueue_args(:perform, :max_attempts => 2, :on_failure => :on_failure)
349
+ expect { @worker.run }.to change { ErrorJob.failure_runs }.by(1)
350
+ expect(ErrorJob.last_error.to_s).to eq 'did not work'
351
+ end
352
+
353
+ it "should call the on_permanent_failure callback" do
354
+ ErrorJob.last_error = nil
355
+ ErrorJob.new.send_later_enqueue_args(:perform, :max_attempts => 1, :on_permanent_failure => :on_failure)
356
+ expect { @worker.run }.to change { ErrorJob.failure_runs }.by(1)
357
+ expect(ErrorJob.last_error.to_s).to eq 'did not work'
358
+ end
359
+ end
314
360
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: canvas-jobs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.1
4
+ version: 0.10.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tobias Luetke
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-11-17 00:00:00.000000000 Z
12
+ date: 2015-12-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: after_transaction_commit
@@ -276,6 +276,7 @@ files:
276
276
  - db/migrate/20140505223637_drop_failed_jobs_original_id.rb
277
277
  - db/migrate/20140512213941_add_source_to_jobs.rb
278
278
  - db/migrate/20150807133223_add_max_concurrent_to_jobs.rb
279
+ - db/migrate/20151123210429_add_expires_at_to_jobs.rb
279
280
  - lib/canvas-jobs.rb
280
281
  - lib/delayed/backend/active_record.rb
281
282
  - lib/delayed/backend/base.rb
@@ -318,11 +319,8 @@ files:
318
319
  - spec/gemfiles/32.gemfile
319
320
  - spec/gemfiles/32.gemfile.lock
320
321
  - spec/gemfiles/40.gemfile
321
- - spec/gemfiles/40.gemfile.lock
322
322
  - spec/gemfiles/41.gemfile
323
- - spec/gemfiles/41.gemfile.lock
324
323
  - spec/gemfiles/42.gemfile
325
- - spec/gemfiles/42.gemfile.lock
326
324
  - spec/migrate/20140924140513_add_story_table.rb
327
325
  - spec/redis_job_spec.rb
328
326
  - spec/sample_jobs.rb
@@ -365,11 +363,8 @@ test_files:
365
363
  - spec/gemfiles/32.gemfile
366
364
  - spec/gemfiles/32.gemfile.lock
367
365
  - spec/gemfiles/40.gemfile
368
- - spec/gemfiles/40.gemfile.lock
369
366
  - spec/gemfiles/41.gemfile
370
- - spec/gemfiles/41.gemfile.lock
371
367
  - spec/gemfiles/42.gemfile
372
- - spec/gemfiles/42.gemfile.lock
373
368
  - spec/migrate/20140924140513_add_story_table.rb
374
369
  - spec/redis_job_spec.rb
375
370
  - spec/sample_jobs.rb
@@ -381,3 +376,4 @@ test_files:
381
376
  - spec/shared/worker.rb
382
377
  - spec/shared_jobs_specs.rb
383
378
  - spec/spec_helper.rb
379
+ has_rdoc:
@@ -1,126 +0,0 @@
1
- PATH
2
- remote: ../../
3
- specs:
4
- canvas-jobs (0.9.11)
5
- activerecord (>= 3.2)
6
- after_transaction_commit (= 1.0.1)
7
- redis (> 3.0)
8
- redis-scripting (= 1.0.1)
9
- rufus-scheduler (= 2.0.6)
10
-
11
- GEM
12
- remote: https://rubygems.org/
13
- specs:
14
- actionmailer (4.0.10)
15
- actionpack (= 4.0.10)
16
- mail (~> 2.5, >= 2.5.4)
17
- actionpack (4.0.10)
18
- activesupport (= 4.0.10)
19
- builder (~> 3.1.0)
20
- erubis (~> 2.7.0)
21
- rack (~> 1.5.2)
22
- rack-test (~> 0.6.2)
23
- activemodel (4.0.10)
24
- activesupport (= 4.0.10)
25
- builder (~> 3.1.0)
26
- activerecord (4.0.10)
27
- activemodel (= 4.0.10)
28
- activerecord-deprecated_finders (~> 1.0.2)
29
- activesupport (= 4.0.10)
30
- arel (~> 4.0.0)
31
- activerecord-deprecated_finders (1.0.3)
32
- activesupport (4.0.10)
33
- i18n (~> 0.6, >= 0.6.9)
34
- minitest (~> 4.2)
35
- multi_json (~> 1.3)
36
- thread_safe (~> 0.1)
37
- tzinfo (~> 0.3.37)
38
- after_transaction_commit (1.0.1)
39
- activerecord (>= 3.2)
40
- arel (4.0.2)
41
- builder (3.1.4)
42
- bump (0.5.0)
43
- coderay (1.1.0)
44
- database_cleaner (1.3.0)
45
- diff-lcs (1.2.5)
46
- erubis (2.7.0)
47
- hike (1.2.3)
48
- i18n (0.6.11)
49
- mail (2.6.1)
50
- mime-types (>= 1.16, < 3)
51
- method_source (0.8.2)
52
- mime-types (2.3)
53
- minitest (4.7.5)
54
- multi_json (1.10.1)
55
- pg (0.17.1)
56
- pry (0.10.1)
57
- coderay (~> 1.1.0)
58
- method_source (~> 0.8.1)
59
- slop (~> 3.4)
60
- rack (1.5.2)
61
- rack-test (0.6.2)
62
- rack (>= 1.0)
63
- rails (4.0.10)
64
- actionmailer (= 4.0.10)
65
- actionpack (= 4.0.10)
66
- activerecord (= 4.0.10)
67
- activesupport (= 4.0.10)
68
- bundler (>= 1.3.0, < 2.0)
69
- railties (= 4.0.10)
70
- sprockets-rails (~> 2.0)
71
- railties (4.0.10)
72
- actionpack (= 4.0.10)
73
- activesupport (= 4.0.10)
74
- rake (>= 0.8.7)
75
- thor (>= 0.18.1, < 2.0)
76
- rake (10.3.2)
77
- redis (3.1.0)
78
- redis-scripting (1.0.1)
79
- redis (>= 3.0)
80
- rspec (3.1.0)
81
- rspec-core (~> 3.1.0)
82
- rspec-expectations (~> 3.1.0)
83
- rspec-mocks (~> 3.1.0)
84
- rspec-core (3.1.5)
85
- rspec-support (~> 3.1.0)
86
- rspec-expectations (3.1.2)
87
- diff-lcs (>= 1.2.0, < 2.0)
88
- rspec-support (~> 3.1.0)
89
- rspec-mocks (3.1.2)
90
- rspec-support (~> 3.1.0)
91
- rspec-support (3.1.1)
92
- rufus-scheduler (2.0.6)
93
- slop (3.6.0)
94
- sprockets (2.12.2)
95
- hike (~> 1.2)
96
- multi_json (~> 1.0)
97
- rack (~> 1.0)
98
- tilt (~> 1.1, != 1.3.0)
99
- sprockets-rails (2.1.4)
100
- actionpack (>= 3.0)
101
- activesupport (>= 3.0)
102
- sprockets (~> 2.8)
103
- test_after_commit (0.4.0)
104
- activerecord (>= 3.2)
105
- thor (0.19.1)
106
- thread_safe (0.3.4)
107
- tilt (1.4.1)
108
- timecop (0.7.1)
109
- tzinfo (0.3.41)
110
- wwtd (0.7.0)
111
-
112
- PLATFORMS
113
- ruby
114
-
115
- DEPENDENCIES
116
- bump
117
- canvas-jobs!
118
- database_cleaner (= 1.3.0)
119
- pg
120
- pry
121
- rails (~> 4.0.10)
122
- rake
123
- rspec (= 3.1.0)
124
- test_after_commit (= 0.4.0)
125
- timecop (= 0.7.1)
126
- wwtd (= 0.7.0)
@@ -1,132 +0,0 @@
1
- PATH
2
- remote: ../../
3
- specs:
4
- canvas-jobs (0.9.10)
5
- after_transaction_commit (= 1.0.1)
6
- rails (>= 3.2)
7
- redis (> 3.0)
8
- redis-scripting (= 1.0.1)
9
- rufus-scheduler (= 2.0.6)
10
-
11
- GEM
12
- remote: https://rubygems.org/
13
- specs:
14
- actionmailer (4.1.6)
15
- actionpack (= 4.1.6)
16
- actionview (= 4.1.6)
17
- mail (~> 2.5, >= 2.5.4)
18
- actionpack (4.1.6)
19
- actionview (= 4.1.6)
20
- activesupport (= 4.1.6)
21
- rack (~> 1.5.2)
22
- rack-test (~> 0.6.2)
23
- actionview (4.1.6)
24
- activesupport (= 4.1.6)
25
- builder (~> 3.1)
26
- erubis (~> 2.7.0)
27
- activemodel (4.1.6)
28
- activesupport (= 4.1.6)
29
- builder (~> 3.1)
30
- activerecord (4.1.6)
31
- activemodel (= 4.1.6)
32
- activesupport (= 4.1.6)
33
- arel (~> 5.0.0)
34
- activesupport (4.1.6)
35
- i18n (~> 0.6, >= 0.6.9)
36
- json (~> 1.7, >= 1.7.7)
37
- minitest (~> 5.1)
38
- thread_safe (~> 0.1)
39
- tzinfo (~> 1.1)
40
- after_transaction_commit (1.0.1)
41
- activerecord (>= 3.2)
42
- arel (5.0.1.20140414130214)
43
- builder (3.2.2)
44
- bump (0.5.0)
45
- coderay (1.1.0)
46
- database_cleaner (1.3.0)
47
- diff-lcs (1.2.5)
48
- erubis (2.7.0)
49
- hike (1.2.3)
50
- i18n (0.6.11)
51
- json (1.8.1)
52
- mail (2.6.1)
53
- mime-types (>= 1.16, < 3)
54
- method_source (0.8.2)
55
- mime-types (2.3)
56
- minitest (5.4.2)
57
- multi_json (1.10.1)
58
- pg (0.17.1)
59
- pry (0.10.1)
60
- coderay (~> 1.1.0)
61
- method_source (~> 0.8.1)
62
- slop (~> 3.4)
63
- rack (1.5.2)
64
- rack-test (0.6.2)
65
- rack (>= 1.0)
66
- rails (4.1.6)
67
- actionmailer (= 4.1.6)
68
- actionpack (= 4.1.6)
69
- actionview (= 4.1.6)
70
- activemodel (= 4.1.6)
71
- activerecord (= 4.1.6)
72
- activesupport (= 4.1.6)
73
- bundler (>= 1.3.0, < 2.0)
74
- railties (= 4.1.6)
75
- sprockets-rails (~> 2.0)
76
- railties (4.1.6)
77
- actionpack (= 4.1.6)
78
- activesupport (= 4.1.6)
79
- rake (>= 0.8.7)
80
- thor (>= 0.18.1, < 2.0)
81
- rake (10.3.2)
82
- redis (3.1.0)
83
- redis-scripting (1.0.1)
84
- redis (>= 3.0)
85
- rspec (3.1.0)
86
- rspec-core (~> 3.1.0)
87
- rspec-expectations (~> 3.1.0)
88
- rspec-mocks (~> 3.1.0)
89
- rspec-core (3.1.5)
90
- rspec-support (~> 3.1.0)
91
- rspec-expectations (3.1.2)
92
- diff-lcs (>= 1.2.0, < 2.0)
93
- rspec-support (~> 3.1.0)
94
- rspec-mocks (3.1.2)
95
- rspec-support (~> 3.1.0)
96
- rspec-support (3.1.1)
97
- rufus-scheduler (2.0.6)
98
- slop (3.6.0)
99
- sprockets (2.12.2)
100
- hike (~> 1.2)
101
- multi_json (~> 1.0)
102
- rack (~> 1.0)
103
- tilt (~> 1.1, != 1.3.0)
104
- sprockets-rails (2.1.4)
105
- actionpack (>= 3.0)
106
- activesupport (>= 3.0)
107
- sprockets (~> 2.8)
108
- test_after_commit (0.3.0)
109
- activerecord (>= 3.2)
110
- thor (0.19.1)
111
- thread_safe (0.3.4)
112
- tilt (1.4.1)
113
- timecop (0.7.1)
114
- tzinfo (1.2.2)
115
- thread_safe (~> 0.1)
116
- wwtd (0.5.5)
117
-
118
- PLATFORMS
119
- ruby
120
-
121
- DEPENDENCIES
122
- bump
123
- canvas-jobs!
124
- database_cleaner
125
- pg
126
- pry
127
- rails (~> 4.1.6)
128
- rake
129
- rspec
130
- test_after_commit
131
- timecop
132
- wwtd
@@ -1,159 +0,0 @@
1
- PATH
2
- remote: ../../
3
- specs:
4
- canvas-jobs (0.9.10)
5
- after_transaction_commit (= 1.0.1)
6
- rails (>= 3.2)
7
- redis (> 3.0)
8
- redis-scripting (= 1.0.1)
9
- rufus-scheduler (= 2.0.6)
10
-
11
- GEM
12
- remote: https://rubygems.org/
13
- specs:
14
- actionmailer (4.2.0.beta2)
15
- actionpack (= 4.2.0.beta2)
16
- actionview (= 4.2.0.beta2)
17
- activejob (= 4.2.0.beta2)
18
- mail (~> 2.5, >= 2.5.4)
19
- rails-dom-testing (~> 1.0, >= 1.0.3)
20
- actionpack (4.2.0.beta2)
21
- actionview (= 4.2.0.beta2)
22
- activesupport (= 4.2.0.beta2)
23
- rack (~> 1.6.0.beta)
24
- rack-test (~> 0.6.2)
25
- rails-dom-testing (~> 1.0, >= 1.0.3)
26
- rails-html-sanitizer (~> 1.0, >= 1.0.1)
27
- actionview (4.2.0.beta2)
28
- activesupport (= 4.2.0.beta2)
29
- builder (~> 3.1)
30
- erubis (~> 2.7.0)
31
- rails-dom-testing (~> 1.0, >= 1.0.3)
32
- rails-html-sanitizer (~> 1.0, >= 1.0.1)
33
- activejob (4.2.0.beta2)
34
- activesupport (= 4.2.0.beta2)
35
- globalid (>= 0.3.0)
36
- activemodel (4.2.0.beta2)
37
- activesupport (= 4.2.0.beta2)
38
- builder (~> 3.1)
39
- activerecord (4.2.0.beta2)
40
- activemodel (= 4.2.0.beta2)
41
- activesupport (= 4.2.0.beta2)
42
- arel (>= 6.0.0.beta1, < 6.1)
43
- activesupport (4.2.0.beta2)
44
- i18n (>= 0.7.0.beta1, < 0.8)
45
- json (~> 1.7, >= 1.7.7)
46
- minitest (~> 5.1)
47
- thread_safe (~> 0.1)
48
- tzinfo (~> 1.1)
49
- after_transaction_commit (1.0.1)
50
- activerecord (>= 3.2)
51
- arel (6.0.0.beta1)
52
- builder (3.2.2)
53
- bump (0.5.0)
54
- coderay (1.1.0)
55
- database_cleaner (1.3.0)
56
- diff-lcs (1.2.5)
57
- erubis (2.7.0)
58
- globalid (0.3.0)
59
- activesupport (>= 4.1.0)
60
- hike (1.2.3)
61
- i18n (0.7.0.beta1)
62
- json (1.8.1)
63
- loofah (2.0.1)
64
- nokogiri (>= 1.5.9)
65
- mail (2.6.1)
66
- mime-types (>= 1.16, < 3)
67
- method_source (0.8.2)
68
- mime-types (2.3)
69
- mini_portile (0.6.0)
70
- minitest (5.4.2)
71
- multi_json (1.10.1)
72
- nokogiri (1.6.3.1)
73
- mini_portile (= 0.6.0)
74
- pg (0.17.1)
75
- pry (0.10.1)
76
- coderay (~> 1.1.0)
77
- method_source (~> 0.8.1)
78
- slop (~> 3.4)
79
- rack (1.6.0.beta)
80
- rack-test (0.6.2)
81
- rack (>= 1.0)
82
- rails (4.2.0.beta2)
83
- actionmailer (= 4.2.0.beta2)
84
- actionpack (= 4.2.0.beta2)
85
- actionview (= 4.2.0.beta2)
86
- activejob (= 4.2.0.beta2)
87
- activemodel (= 4.2.0.beta2)
88
- activerecord (= 4.2.0.beta2)
89
- activesupport (= 4.2.0.beta2)
90
- bundler (>= 1.3.0, < 2.0)
91
- railties (= 4.2.0.beta2)
92
- sprockets-rails (~> 3.0.0.beta1)
93
- rails-deprecated_sanitizer (1.0.3)
94
- activesupport (>= 4.2.0.alpha)
95
- rails-dom-testing (1.0.3)
96
- activesupport
97
- nokogiri (~> 1.6.0)
98
- rails-deprecated_sanitizer (>= 1.0.1)
99
- rails-html-sanitizer (1.0.1)
100
- loofah (~> 2.0)
101
- railties (4.2.0.beta2)
102
- actionpack (= 4.2.0.beta2)
103
- activesupport (= 4.2.0.beta2)
104
- rake (>= 0.8.7)
105
- thor (>= 0.18.1, < 2.0)
106
- rake (10.3.2)
107
- redis (3.1.0)
108
- redis-scripting (1.0.1)
109
- redis (>= 3.0)
110
- rspec (3.1.0)
111
- rspec-core (~> 3.1.0)
112
- rspec-expectations (~> 3.1.0)
113
- rspec-mocks (~> 3.1.0)
114
- rspec-core (3.1.5)
115
- rspec-support (~> 3.1.0)
116
- rspec-expectations (3.1.2)
117
- diff-lcs (>= 1.2.0, < 2.0)
118
- rspec-support (~> 3.1.0)
119
- rspec-mocks (3.1.2)
120
- rspec-support (~> 3.1.0)
121
- rspec-support (3.1.1)
122
- rufus-scheduler (2.0.6)
123
- slop (3.6.0)
124
- sprockets (2.12.2)
125
- hike (~> 1.2)
126
- multi_json (~> 1.0)
127
- rack (~> 1.0)
128
- tilt (~> 1.1, != 1.3.0)
129
- sprockets-rails (3.0.0.beta1)
130
- actionpack (>= 4.0)
131
- activesupport (>= 4.0)
132
- sprockets (~> 2.8)
133
- syck (1.0.4)
134
- test_after_commit (0.3.0)
135
- activerecord (>= 3.2)
136
- thor (0.19.1)
137
- thread_safe (0.3.4)
138
- tilt (1.4.1)
139
- timecop (0.7.1)
140
- tzinfo (1.2.2)
141
- thread_safe (~> 0.1)
142
- wwtd (0.5.5)
143
-
144
- PLATFORMS
145
- ruby
146
-
147
- DEPENDENCIES
148
- bump
149
- canvas-jobs!
150
- database_cleaner
151
- pg
152
- pry
153
- rails (~> 4.2.0.beta2)
154
- rake
155
- rspec
156
- syck
157
- test_after_commit
158
- timecop
159
- wwtd