postburner 1.0.0.pre.3 → 1.0.0.pre.4
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 +4 -4
- data/README.md +61 -67
- data/app/concerns/postburner/commands.rb +143 -0
- data/app/concerns/postburner/execution.rb +190 -0
- data/app/concerns/postburner/insertion.rb +170 -0
- data/app/concerns/postburner/logging.rb +181 -0
- data/{lib/postburner/queue_config.rb → app/concerns/postburner/properties.rb} +65 -4
- data/app/concerns/postburner/statistics.rb +125 -0
- data/app/models/postburner/job.rb +14 -756
- data/app/views/postburner/jobs/show.html.haml +2 -2
- data/lib/postburner/strategies/queue.rb +17 -7
- data/lib/postburner/version.rb +1 -1
- data/lib/postburner.rb +0 -1
- metadata +7 -2
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
(#{@job.run_at.to_i - Time.zone.now.to_i} seconds)
|
|
7
7
|
|
|
8
8
|
%h3 Stats
|
|
9
|
-
- if @job.
|
|
10
|
-
%pre= JSON.pretty_generate @job.
|
|
9
|
+
- if @job.bk
|
|
10
|
+
%pre= JSON.pretty_generate @job.bk.stats.as_json
|
|
11
11
|
|
|
12
12
|
%h3 Job
|
|
13
13
|
%pre= JSON.pretty_generate @job.as_json
|
|
@@ -76,7 +76,7 @@ module Postburner
|
|
|
76
76
|
#debugger
|
|
77
77
|
Postburner::Job.transaction do
|
|
78
78
|
Postburner.connected do |conn|
|
|
79
|
-
tube_name = job.
|
|
79
|
+
tube_name = job.expanded_tube_name
|
|
80
80
|
data = { class: job.class.name, args: [job.id] }
|
|
81
81
|
|
|
82
82
|
# Get priority, TTR from job instance (respects instance overrides) or options
|
|
@@ -84,12 +84,22 @@ module Postburner
|
|
|
84
84
|
delay = options[:delay] || 0
|
|
85
85
|
ttr = options[:ttr] || job.ttr || Postburner.configuration.default_ttr
|
|
86
86
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
87
|
+
begin
|
|
88
|
+
response = conn.tubes[tube_name].put(
|
|
89
|
+
JSON.generate(data),
|
|
90
|
+
pri: pri,
|
|
91
|
+
delay: delay,
|
|
92
|
+
ttr: ttr
|
|
93
|
+
)
|
|
94
|
+
rescue Beaneater::BadFormatError => e
|
|
95
|
+
Rails.logger.error "Beanstalkd BAD_FORMAT error from:"
|
|
96
|
+
Rails.logger.error " tube: #{tube_name}"
|
|
97
|
+
Rails.logger.error " data: #{JSON.generate(data)}"
|
|
98
|
+
Rails.logger.error " pri: #{pri.inspect} (#{pri.class})"
|
|
99
|
+
Rails.logger.error " delay: #{delay.inspect} (#{delay.class})"
|
|
100
|
+
Rails.logger.error " ttr: #{ttr.inspect} (#{ttr.class})"
|
|
101
|
+
raise
|
|
102
|
+
end
|
|
93
103
|
|
|
94
104
|
response
|
|
95
105
|
end
|
data/lib/postburner/version.rb
CHANGED
data/lib/postburner.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: postburner
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.0.pre.
|
|
4
|
+
version: 1.0.0.pre.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Matt Smith
|
|
@@ -110,6 +110,12 @@ files:
|
|
|
110
110
|
- app/assets/config/postburner_manifest.js
|
|
111
111
|
- app/assets/stylesheets/postburner/application.css
|
|
112
112
|
- app/concerns/postburner/callbacks.rb
|
|
113
|
+
- app/concerns/postburner/commands.rb
|
|
114
|
+
- app/concerns/postburner/execution.rb
|
|
115
|
+
- app/concerns/postburner/insertion.rb
|
|
116
|
+
- app/concerns/postburner/logging.rb
|
|
117
|
+
- app/concerns/postburner/properties.rb
|
|
118
|
+
- app/concerns/postburner/statistics.rb
|
|
113
119
|
- app/controllers/postburner/application_controller.rb
|
|
114
120
|
- app/controllers/postburner/jobs_controller.rb
|
|
115
121
|
- app/controllers/postburner/static_controller.rb
|
|
@@ -141,7 +147,6 @@ files:
|
|
|
141
147
|
- lib/postburner/configuration.rb
|
|
142
148
|
- lib/postburner/connection.rb
|
|
143
149
|
- lib/postburner/engine.rb
|
|
144
|
-
- lib/postburner/queue_config.rb
|
|
145
150
|
- lib/postburner/strategies/immediate_test_queue.rb
|
|
146
151
|
- lib/postburner/strategies/nice_queue.rb
|
|
147
152
|
- lib/postburner/strategies/null_queue.rb
|