backburner 1.2.0 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/backburner/version.rb +1 -1
- data/lib/backburner/worker.rb +5 -4
- metadata +15 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ba786ac1dbb767afc923b6da0ef80e525043ad20
|
4
|
+
data.tar.gz: 200863f6e8c0be7731e1448c9c3285db82f3b31f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 869c7ec413947f7b58c215aae770aea0826a005b414804d39f356c264df912c41d5ee02f5516d7bd357b937b5d7f48a5d2ac92faa0d450f46ae735bf54217f1b
|
7
|
+
data.tar.gz: dfcac3547f1a52ea5f6b955a996fd05fa6375b0bef0e9a2b196c363dd913d09885ff998dd4ae54e7305ff8835c9ebd477eac88a2d6ee8a8b0e1fc96953ee87b2
|
data/CHANGELOG.md
CHANGED
data/lib/backburner/version.rb
CHANGED
data/lib/backburner/worker.rb
CHANGED
@@ -29,23 +29,24 @@ module Backburner
|
|
29
29
|
ttr = resolve_respond_timeout(opts[:ttr] || job_class)
|
30
30
|
res = Backburner::Hooks.invoke_hook_events(job_class, :before_enqueue, *args)
|
31
31
|
|
32
|
-
return
|
32
|
+
return nil unless res # stop if hook is false
|
33
33
|
|
34
34
|
data = { :class => job_class.name, :args => args }
|
35
35
|
queue = opts[:queue] && (Proc === opts[:queue] ? opts[:queue].call(job_class) : opts[:queue])
|
36
36
|
|
37
37
|
begin
|
38
|
+
response = nil
|
38
39
|
connection = Backburner::Connection.new(Backburner.configuration.beanstalk_url)
|
39
40
|
connection.retryable do
|
40
41
|
tube = connection.tubes[expand_tube_name(queue || job_class)]
|
41
|
-
tube.put(data.to_json, :pri => pri, :delay => delay, :ttr => ttr)
|
42
|
+
response = tube.put(data.to_json, :pri => pri, :delay => delay, :ttr => ttr)
|
42
43
|
end
|
43
|
-
Backburner::Hooks.invoke_hook_events(job_class, :after_enqueue, *args)
|
44
|
+
return nil unless Backburner::Hooks.invoke_hook_events(job_class, :after_enqueue, *args)
|
44
45
|
ensure
|
45
46
|
connection.close if connection
|
46
47
|
end
|
47
48
|
|
48
|
-
|
49
|
+
response
|
49
50
|
end
|
50
51
|
|
51
52
|
# Starts processing jobs with the specified tube_names.
|
metadata
CHANGED
@@ -1,55 +1,55 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: backburner
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nathan Esquenazi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-02-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: beaneater
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ~>
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '1.0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ~>
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '1.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: dante
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - '>'
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: 0.1.5
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - '>'
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: 0.1.5
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rake
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - '>='
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - '>='
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
@@ -70,14 +70,14 @@ dependencies:
|
|
70
70
|
name: mocha
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- -
|
73
|
+
- - '>='
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: '0'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- -
|
80
|
+
- - '>='
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
83
|
description: Beanstalk background job processing made easy
|
@@ -88,8 +88,8 @@ executables:
|
|
88
88
|
extensions: []
|
89
89
|
extra_rdoc_files: []
|
90
90
|
files:
|
91
|
-
-
|
92
|
-
-
|
91
|
+
- .gitignore
|
92
|
+
- .travis.yml
|
93
93
|
- CHANGELOG.md
|
94
94
|
- CONTRIBUTING.md
|
95
95
|
- Gemfile
|
@@ -155,17 +155,17 @@ require_paths:
|
|
155
155
|
- lib
|
156
156
|
required_ruby_version: !ruby/object:Gem::Requirement
|
157
157
|
requirements:
|
158
|
-
- -
|
158
|
+
- - '>='
|
159
159
|
- !ruby/object:Gem::Version
|
160
160
|
version: '0'
|
161
161
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
162
162
|
requirements:
|
163
|
-
- -
|
163
|
+
- - '>='
|
164
164
|
- !ruby/object:Gem::Version
|
165
165
|
version: '0'
|
166
166
|
requirements: []
|
167
167
|
rubyforge_project:
|
168
|
-
rubygems_version: 2.
|
168
|
+
rubygems_version: 2.4.8
|
169
169
|
signing_key:
|
170
170
|
specification_version: 4
|
171
171
|
summary: Reliable beanstalk background job processing made easy for Ruby and Sinatra
|