inst-jobs 0.11.5 → 0.11.6
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e21f31dc7f5360307577a7c3e31d1747f8b7359c
|
4
|
+
data.tar.gz: 2191834aa82cf0a63065b9ac951f9aafbd78d391
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6558c7935c3dc4347a47685527fec8c5529b610649ee4a26ddeb10216ca5e15e8ef154b4b6bb87088a347a7327678b4c19015d68b6e5ae2e799b585802197010
|
7
|
+
data.tar.gz: ea259677667525224c10d0f73ee354b33e4e75b2fa78ae42ed406a42c293540f6cb3183c5a04da2b1ff3694e49f5e8b726132559575e62c8e02d7e1468f57cc7
|
@@ -0,0 +1,38 @@
|
|
1
|
+
class AddBackDefaultStringLimitsJobs < ActiveRecord::Migration
|
2
|
+
def connection
|
3
|
+
Delayed::Job.connection
|
4
|
+
end
|
5
|
+
|
6
|
+
def up
|
7
|
+
drop_triggers
|
8
|
+
|
9
|
+
add_string_limit_if_missing :delayed_jobs, :queue
|
10
|
+
add_string_limit_if_missing :delayed_jobs, :locked_by
|
11
|
+
add_string_limit_if_missing :delayed_jobs, :tag
|
12
|
+
add_string_limit_if_missing :delayed_jobs, :strand
|
13
|
+
add_string_limit_if_missing :delayed_jobs, :source
|
14
|
+
|
15
|
+
add_string_limit_if_missing :failed_jobs, :queue
|
16
|
+
add_string_limit_if_missing :failed_jobs, :locked_by
|
17
|
+
add_string_limit_if_missing :failed_jobs, :tag
|
18
|
+
add_string_limit_if_missing :failed_jobs, :strand
|
19
|
+
add_string_limit_if_missing :failed_jobs, :source
|
20
|
+
|
21
|
+
readd_triggers
|
22
|
+
end
|
23
|
+
|
24
|
+
def drop_triggers
|
25
|
+
execute %{DROP TRIGGER delayed_jobs_before_insert_row_tr ON delayed_jobs}
|
26
|
+
execute %{DROP TRIGGER delayed_jobs_after_delete_row_tr ON delayed_jobs}
|
27
|
+
end
|
28
|
+
|
29
|
+
def readd_triggers
|
30
|
+
execute("CREATE TRIGGER delayed_jobs_before_insert_row_tr BEFORE INSERT ON delayed_jobs FOR EACH ROW WHEN (NEW.strand IS NOT NULL) EXECUTE PROCEDURE delayed_jobs_before_insert_row_tr_fn()")
|
31
|
+
execute("CREATE TRIGGER delayed_jobs_after_delete_row_tr AFTER DELETE ON delayed_jobs FOR EACH ROW WHEN (OLD.strand IS NOT NULL AND OLD.next_in_strand = 't') EXECUTE PROCEDURE delayed_jobs_after_delete_row_tr_fn()")
|
32
|
+
end
|
33
|
+
|
34
|
+
def add_string_limit_if_missing(table, column)
|
35
|
+
return if column_exists?(table, column, :string, limit: 255)
|
36
|
+
change_column table, column, :string, limit: 255
|
37
|
+
end
|
38
|
+
end
|
data/lib/delayed/backend/base.rb
CHANGED
@@ -313,6 +313,9 @@ module Delayed
|
|
313
313
|
rescue TypeError, LoadError, NameError => e
|
314
314
|
raise DeserializationError,
|
315
315
|
"Job failed to load: #{e.message}. Try to manually require the required file."
|
316
|
+
rescue ArgumentError, Psych::SyntaxError => e
|
317
|
+
raise DeserializationError,
|
318
|
+
"YAML parsing error: #{e.message}. Probably not recoverable."
|
316
319
|
end
|
317
320
|
|
318
321
|
def _yaml_deserialize(source)
|
data/lib/delayed/version.rb
CHANGED
@@ -83,6 +83,11 @@ shared_examples_for 'a backend' do
|
|
83
83
|
lambda { job.payload_object.perform }.should raise_error(Delayed::Backend::DeserializationError)
|
84
84
|
end
|
85
85
|
|
86
|
+
it "should raise an DeserializationError when the handler is invalid YAML" do
|
87
|
+
job = Delayed::Job.new :handler => %{test: ""11"}
|
88
|
+
lambda { job.payload_object.perform }.should raise_error(Delayed::Backend::DeserializationError, /parsing error/)
|
89
|
+
end
|
90
|
+
|
86
91
|
describe "find_available" do
|
87
92
|
it "should not find failed jobs" do
|
88
93
|
@job = create_job :attempts => 50
|
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.11.
|
4
|
+
version: 0.11.6
|
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: 2016-
|
12
|
+
date: 2016-12-06 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: after_transaction_commit
|
@@ -45,14 +45,14 @@ dependencies:
|
|
45
45
|
requirements:
|
46
46
|
- - "~>"
|
47
47
|
- !ruby/object:Gem::Version
|
48
|
-
version:
|
48
|
+
version: 3.2.0
|
49
49
|
type: :runtime
|
50
50
|
prerelease: false
|
51
51
|
version_requirements: !ruby/object:Gem::Requirement
|
52
52
|
requirements:
|
53
53
|
- - "~>"
|
54
54
|
- !ruby/object:Gem::Version
|
55
|
-
version:
|
55
|
+
version: 3.2.0
|
56
56
|
- !ruby/object:Gem::Dependency
|
57
57
|
name: redis
|
58
58
|
requirement: !ruby/object:Gem::Requirement
|
@@ -278,6 +278,7 @@ files:
|
|
278
278
|
- db/migrate/20150807133223_add_max_concurrent_to_jobs.rb
|
279
279
|
- db/migrate/20151123210429_add_expires_at_to_jobs.rb
|
280
280
|
- db/migrate/20151210162949_improve_max_concurrent.rb
|
281
|
+
- db/migrate/20161206323555_add_back_default_string_limits_jobs.rb
|
281
282
|
- lib/delayed/backend/active_record.rb
|
282
283
|
- lib/delayed/backend/base.rb
|
283
284
|
- lib/delayed/backend/redis/bulk_update.lua
|
@@ -360,7 +361,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
360
361
|
version: '0'
|
361
362
|
requirements: []
|
362
363
|
rubyforge_project:
|
363
|
-
rubygems_version: 2.6.
|
364
|
+
rubygems_version: 2.6.7
|
364
365
|
signing_key:
|
365
366
|
specification_version: 4
|
366
367
|
summary: Instructure-maintained fork of delayed_job
|