resque-job_history 0.0.20 → 0.0.23

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
  SHA256:
3
- metadata.gz: 74efd65b38f6d08e25d24bce58b4fafa97e3136df8c0cef2b10177af4f85f17d
4
- data.tar.gz: 96e82ad40c7bd5d0371e6dc975296235e04a2e71eec4cb0646bd1f876f7cc24d
3
+ metadata.gz: 6a7d4b67d242c94799ded788270e28fcd0b0c8ec770e66bb14a2a4c334c57e8c
4
+ data.tar.gz: 8771dbe786146ddf9704214b36a2bbd47ce891aa5cd932c6501d815947536e80
5
5
  SHA512:
6
- metadata.gz: 82be65f4e0c8e1dbe91b237b135f1cd375c22240849cc16a549cde3481681106a126988af8c4674c6c834efa139ca48193ab0240603a1eb89a84f4d66965aaaa
7
- data.tar.gz: 2de10d9d4f626e8d1ae32e1a3d4f589290badcf71979c846d353ab4b4eac7ecc183d8ebf0c97e750f85e15b95185c876f92738487aa22d3e46bd328435eedae4
6
+ metadata.gz: 195e495dacd244026163b699afdcbf7830dee8904b0139b5f18db847fb4a8be65b4bdf84d56249b57102abcdcddf2ffe94d77486438404691641e596cf5ed0ab
7
+ data.tar.gz: 315d8eb3c4d34e4c18a88338173fc9034f11e02e026dc062a39758f535e917cdec926820a4c7ab00ec830cf475f21fce5fab55e2657faae374f166cf16a0e0fe
@@ -41,7 +41,7 @@ module Resque
41
41
  job_history_params(base)
42
42
 
43
43
  base.class_eval do
44
- get "/job history" do
44
+ get "/job_history" do
45
45
  set_job_history_params
46
46
 
47
47
  erb File.read(Resque::JobHistoryServer.erb_path("job_history.erb"))
@@ -67,7 +67,7 @@ module Resque
67
67
  finished_page_params(base)
68
68
 
69
69
  base.class_eval do
70
- get "/job history/job_class_details" do
70
+ get "/job_history/job_class_details" do
71
71
  set_class_details_params
72
72
 
73
73
  erb File.read(Resque::JobHistoryServer.erb_path("job_class_details.erb"))
@@ -107,7 +107,7 @@ module Resque
107
107
 
108
108
  def job_details(base)
109
109
  base.class_eval do
110
- get "/job history/job_details" do
110
+ get "/job_history/job_details" do
111
111
  @job_class_name = params[:class_name]
112
112
  @job_id = params[:job_id]
113
113
 
@@ -118,7 +118,7 @@ module Resque
118
118
 
119
119
  def linear_list(base)
120
120
  base.class_eval do
121
- get "/job history/linear_history" do
121
+ get "/job_history/linear_history" do
122
122
  @page_num = (params[:page_num] || 1).to_i
123
123
  @page_size = (params[:page_size] ||
124
124
  Resque::Plugins::JobHistory::HistoryDetails.linear_page_size).to_i
@@ -150,10 +150,10 @@ module Resque
150
150
 
151
151
  def cancel_job(base)
152
152
  base.class_eval do
153
- post "/job history/cancel_job" do
153
+ post "/job_history/cancel_job" do
154
154
  Resque::Plugins::JobHistory::Job.new(params[:class_name], params[:job_id]).cancel
155
155
 
156
- redirect u("job history/job_details?#{{ class_name: params[:class_name],
156
+ redirect u("job_history/job_details?#{{ class_name: params[:class_name],
157
157
  job_id: params[:job_id] }.to_param}")
158
158
  end
159
159
  end
@@ -161,57 +161,57 @@ module Resque
161
161
 
162
162
  def delete_job(base)
163
163
  base.class_eval do
164
- post "/job history/delete_job" do
164
+ post "/job_history/delete_job" do
165
165
  Resque::Plugins::JobHistory::Job.new(params[:class_name], params[:job_id]).purge
166
166
 
167
- redirect u("job history/job_class_details?#{{ class_name: params[:class_name] }.to_param}")
167
+ redirect u("job_history/job_class_details?#{{ class_name: params[:class_name] }.to_param}")
168
168
  end
169
169
  end
170
170
  end
171
171
 
172
172
  def retry_job(base)
173
173
  base.class_eval do
174
- post "/job history/retry_job" do
174
+ post "/job_history/retry_job" do
175
175
  Resque::Plugins::JobHistory::Job.new(params[:class_name], params[:job_id]).retry
176
176
 
177
- redirect u("job history/job_class_details?#{{ class_name: params[:class_name] }.to_param}")
177
+ redirect u("job_history/job_class_details?#{{ class_name: params[:class_name] }.to_param}")
178
178
  end
179
179
  end
180
180
  end
181
181
 
182
182
  def purge_class(base)
183
183
  base.class_eval do
184
- post "/job history/purge_class" do
184
+ post "/job_history/purge_class" do
185
185
  Resque::Plugins::JobHistory::Cleaner.purge_class(params[:class_name])
186
186
 
187
- redirect u("job history")
187
+ redirect u("job_history")
188
188
  end
189
189
  end
190
190
  end
191
191
 
192
192
  def purge_all(base)
193
193
  base.class_eval do
194
- post "/job history/purge_all" do
194
+ post "/job_history/purge_all" do
195
195
  Resque::Plugins::JobHistory::Cleaner.purge_all_jobs
196
196
 
197
- redirect u("job history")
197
+ redirect u("job_history")
198
198
  end
199
199
  end
200
200
  end
201
201
 
202
202
  def purge_linear_history(base)
203
203
  base.class_eval do
204
- post "/job history/purge_linear_history" do
204
+ post "/job_history/purge_linear_history" do
205
205
  Resque::Plugins::JobHistory::Cleaner.purge_linear_history
206
206
 
207
- redirect u("job history")
207
+ redirect u("job_history")
208
208
  end
209
209
  end
210
210
  end
211
211
 
212
212
  def search_all(base)
213
213
  base.class_eval do
214
- post "/job history/search_all" do
214
+ post "/job_history/search_all" do
215
215
  @job_search = Resque::Plugins::JobHistory::JobSearch.new(params)
216
216
 
217
217
  @job_search.search
@@ -223,7 +223,7 @@ module Resque
223
223
 
224
224
  def search_job(base)
225
225
  base.class_eval do
226
- post "/job history/search_job" do
226
+ post "/job_history/search_job" do
227
227
  @job_search = Resque::Plugins::JobHistory::JobSearch.new(params)
228
228
 
229
229
  @job_search.search
@@ -235,7 +235,7 @@ module Resque
235
235
 
236
236
  def search_linear_history(base)
237
237
  base.class_eval do
238
- post "/job history/search_linear_history" do
238
+ post "/job_history/search_linear_history" do
239
239
  @job_search = Resque::Plugins::JobHistory::JobSearch.new(params)
240
240
 
241
241
  @job_search.search
@@ -109,8 +109,8 @@ module Resque
109
109
  running_jobs.jobs.each do |job|
110
110
  job_start = job.start_time
111
111
 
112
- if job_start.blank? || job_start.to_time < too_old_time
113
- job.cancel
112
+ if job_start.present? && job_start.to_time < too_old_time
113
+ job.cancel " Job timed out."
114
114
  end
115
115
  end
116
116
  end
@@ -28,12 +28,16 @@ module Resque
28
28
  stored_values[:end_time].present?
29
29
  end
30
30
 
31
+ def blank?
32
+ !redis.exists job_key
33
+ end
34
+
31
35
  def succeeded?
32
36
  error.blank?
33
37
  end
34
38
 
35
39
  def duration
36
- (end_time || Time.now) - start_time
40
+ (end_time || Time.now) - (start_time || Time.now)
37
41
  end
38
42
 
39
43
  def end_time
@@ -45,7 +49,7 @@ module Resque
45
49
  end
46
50
 
47
51
  def uncompressed_args
48
- return args if described_class.blank?
52
+ return args if described_class.blank? || args.blank?
49
53
  return args unless described_class.singleton_class.included_modules.map(&:name).include?("Resque::Plugins::Compressible")
50
54
  return args unless described_class.compressed?(args)
51
55
 
@@ -57,7 +61,7 @@ module Resque
57
61
  end
58
62
 
59
63
  def start(*args)
60
- record_job_start(*args)
64
+ record_job_start(Time.now.utc.to_s, *args)
61
65
 
62
66
  num_jobs = running_jobs.add_job(job_id, class_name)
63
67
  linear_jobs.add_job(job_id, class_name) unless class_exclude_from_linear_history
@@ -67,10 +71,16 @@ module Resque
67
71
  self
68
72
  end
69
73
 
70
- def finish
71
- redis.hset(job_key, "end_time", Time.now.utc.to_s)
74
+ def finish(start_time = nil, *args)
75
+ if start_time.present?
76
+ record_job_start(start_time, *args)
77
+ end
78
+
79
+ if present?
80
+ redis.hset(job_key, "end_time", Time.now.utc.to_s)
81
+ finished_jobs.add_job(job_id, class_name)
82
+ end
72
83
 
73
- finished_jobs.add_job(job_id, class_name)
74
84
  running_jobs.remove_job(job_id)
75
85
 
76
86
  reset
@@ -78,18 +88,34 @@ module Resque
78
88
  self
79
89
  end
80
90
 
81
- def failed(exception)
82
- redis.hset(job_key, "error", exception_message(exception))
91
+ def failed(exception, start_time = nil, *args)
92
+ if start_time.present?
93
+ record_job_start(start_time, *args)
94
+ end
95
+
96
+ redis.hset(job_key, "error", exception_message(exception)) if present?
83
97
  redis.incr(total_failed_key)
84
98
 
85
99
  finish
86
100
  end
87
101
 
88
- def cancel
89
- redis.hset(job_key,
90
- "error",
91
- "Unknown - Job failed to signal ending after the configured purge time or "\
92
- "was canceled manually.")
102
+ def abort
103
+ running_jobs.remove_job(job_id)
104
+
105
+ reset
106
+ end
107
+
108
+ def cancel(caller_message = nil, start_time = nil, *args)
109
+ if start_time.present?
110
+ record_job_start(start_time, *args)
111
+ end
112
+
113
+ if present?
114
+ redis.hset(job_key,
115
+ "error",
116
+ "Unknown - Job failed to signal ending after the configured purge time or was canceled manually.#{caller_message}")
117
+ end
118
+
93
119
  redis.incr(total_failed_key)
94
120
 
95
121
  finish
@@ -111,7 +137,7 @@ module Resque
111
137
 
112
138
  def purge
113
139
  # To keep the counts honest...
114
- cancel unless finished?
140
+ abort unless finished?
115
141
 
116
142
  remove_from_job_lists
117
143
 
@@ -136,8 +162,8 @@ module Resque
136
162
  linear_jobs.remove_job(job_id)
137
163
  end
138
164
 
139
- def record_job_start(*args)
140
- redis.hset(job_key, "start_time", Time.now.utc.to_s)
165
+ def record_job_start(start_time, *args)
166
+ redis.hset(job_key, "start_time", start_time)
141
167
  redis.hset(job_key, "args", encode_args(*args))
142
168
 
143
169
  reset
@@ -51,6 +51,7 @@ module Resque
51
51
  end
52
52
 
53
53
  def around_perform_job_history(*args)
54
+ start_time = Time.now
54
55
  running_job = Resque::Plugins::JobHistory::Job.new(active_job_class_name(*args), SecureRandom.uuid)
55
56
  self.most_recent_job = running_job
56
57
 
@@ -59,12 +60,15 @@ module Resque
59
60
 
60
61
  yield if block_given?
61
62
 
62
- running_job.finish
63
+ running_job.finish(start_time, *args)
63
64
  rescue StandardError => exception
64
- running_job.failed exception
65
+ running_job.failed exception, start_time, *args
65
66
  raise
66
67
  ensure
67
- running_job.cancel unless running_job.finished? || running_job.error
68
+ if running_job.present? && !running_job.finished? && !running_job.error
69
+ running_job.cancel(" Job did not signal completion on finish.", start_time, *args)
70
+ end
71
+
68
72
  self.most_recent_job = nil
69
73
  end
70
74
  end
@@ -99,18 +103,9 @@ module Resque
99
103
 
100
104
  private
101
105
 
102
- def job_class_has_history?(*args)
103
- if Object.const_defined?("ActiveJob::QueueAdapters::ResqueAdapter::JobWrapper") &&
104
- self >= ActiveJob::QueueAdapters::ResqueAdapter::JobWrapper
105
- args[-1]["job_class"].constantize.included_modules.include? Resque::Plugins::JobHistory
106
- else
107
- true
108
- end
109
- end
110
-
111
106
  def active_job_class_name(*args)
112
107
  if Object.const_defined?("ActiveJob::QueueAdapters::ResqueAdapter::JobWrapper") &&
113
- self >= ActiveJob::QueueAdapters::ResqueAdapter::JobWrapper
108
+ self >= "ActiveJob::QueueAdapters::ResqueAdapter::JobWrapper".constantize
114
109
  args[-1]["job_class"]
115
110
  else
116
111
  name
@@ -119,7 +114,7 @@ module Resque
119
114
 
120
115
  def active_job_args(*args)
121
116
  if Object.const_defined?("ActiveJob::QueueAdapters::ResqueAdapter::JobWrapper") &&
122
- self >= ActiveJob::QueueAdapters::ResqueAdapter::JobWrapper
117
+ self >= "ActiveJob::QueueAdapters::ResqueAdapter::JobWrapper".constantize
123
118
  args[-1]["arguments"]
124
119
  else
125
120
  args
@@ -144,8 +139,7 @@ module Resque
144
139
  end
145
140
 
146
141
  if Object.const_defined?("ActiveJob::QueueAdapters::ResqueAdapter::JobWrapper")
147
- unless ActiveJob::QueueAdapters::ResqueAdapter::JobWrapper.included_modules.
148
- include? Resque::Plugins::JobHistory
149
- ActiveJob::QueueAdapters::ResqueAdapter::JobWrapper.include Resque::Plugins::JobHistory
142
+ unless "ActiveJob::QueueAdapters::ResqueAdapter::JobWrapper".constantize.included_modules.include? Resque::Plugins::JobHistory
143
+ "ActiveJob::QueueAdapters::ResqueAdapter::JobWrapper".constantize.include Resque::Plugins::JobHistory
150
144
  end
151
145
  end
@@ -9,7 +9,7 @@
9
9
 
10
10
  <% if total_pages > 1 %>
11
11
  <div class="job_history_prev_links">
12
- <a href="<%= u("job history") %>?<%= { sort: @sort_by,
12
+ <a href="<%= u("job_history") %>?<%= { sort: @sort_by,
13
13
  page_size: page_size,
14
14
  page_num: 1,
15
15
  order: @sort_order }.to_param %>"
@@ -18,7 +18,7 @@
18
18
  &lt;&lt; First
19
19
  </a>
20
20
 
21
- <a href="<%= u("job history") %>?<%= { sort: @sort_by,
21
+ <a href="<%= u("job_history") %>?<%= { sort: @sort_by,
22
22
  page_size: page_size,
23
23
  page_num: [1, page_num - 1].max,
24
24
  order: @sort_order }.to_param %>"
@@ -31,7 +31,7 @@
31
31
  <div class="job_history_pages">
32
32
  <% (first_page..last_page).each do |page_number| %>
33
33
  <% if page_number != page_num %>
34
- <a href="<%= u("job history") %>?<%= { sort: @sort_by,
34
+ <a href="<%= u("job_history") %>?<%= { sort: @sort_by,
35
35
  page_size: page_size,
36
36
  page_num: page_number,
37
37
  order: @sort_order }.to_param %>"
@@ -45,7 +45,7 @@
45
45
  </div>
46
46
 
47
47
  <div class="job_history_next_links">
48
- <a href="<%= u("job history") %>?<%= { sort: @sort_by,
48
+ <a href="<%= u("job_history") %>?<%= { sort: @sort_by,
49
49
  page_size: page_size,
50
50
  page_num: [total_pages, page_num + 1].min,
51
51
  order: @sort_order }.to_param %>"
@@ -54,7 +54,7 @@
54
54
  Next &gt;
55
55
  </a>
56
56
 
57
- <a href="<%= u("job history") %>?<%= { sort: @sort_by,
57
+ <a href="<%= u("job_history") %>?<%= { sort: @sort_by,
58
58
  page_size: page_size,
59
59
  page_num: total_pages,
60
60
  order: @sort_order }.to_param %>"
@@ -13,14 +13,14 @@
13
13
  <tr<%= job_details.succeeded? ? "" : " class=\"job_history_error\"" %>>
14
14
  <% if show_class %>
15
15
  <td>
16
- <a href="<%= u("job history/job_class_details") %>?<%=
16
+ <a href="<%= u("job_history/job_class_details") %>?<%=
17
17
  { class_name: job_details.class_name }.to_param %>">
18
18
  <%= job_details.class_name %>
19
19
  </a>
20
20
  </td>
21
21
  <% end %>
22
22
  <td>
23
- <a href="<%= u("job history/job_details") %>?class_name=<%=
23
+ <a href="<%= u("job_history/job_details") %>?class_name=<%=
24
24
  job_details.class_name %>&job_id=<%= job_details.job_id %>">
25
25
  <% if job_details.start_time %>
26
26
  <%= time_ago_in_words(job_details.start_time) %> ago
@@ -9,7 +9,7 @@
9
9
 
10
10
  <% if total_pages > 1 %>
11
11
  <div class="job_history_prev_links">
12
- <a href="<%= u("job history/job_class_details") %>?<%=
12
+ <a href="<%= u("job_history/job_class_details") %>?<%=
13
13
  { class_name: class_name,
14
14
  "#{primary_type}_page_size" => page_size,
15
15
  "#{primary_type}_page_num" => 1,
@@ -20,7 +20,7 @@
20
20
  &lt;&lt; First
21
21
  </a>
22
22
 
23
- <a href="<%= u("job history/job_class_details") %>?<%=
23
+ <a href="<%= u("job_history/job_class_details") %>?<%=
24
24
  { class_name: class_name,
25
25
  "#{primary_type}_page_size" => page_size,
26
26
  "#{primary_type}_page_num" => [1, page_num - 1].max,
@@ -35,7 +35,7 @@
35
35
  <div class="job_history_pages">
36
36
  <% (first_page..last_page).each do |page_number| %>
37
37
  <% if page_number != page_num %>
38
- <a href="<%= u("job history/job_class_details") %>?<%=
38
+ <a href="<%= u("job_history/job_class_details") %>?<%=
39
39
  { class_name: class_name,
40
40
  "#{primary_type}_page_size" => page_size,
41
41
  "#{primary_type}_page_num" => page_number,
@@ -51,7 +51,7 @@
51
51
  </div>
52
52
 
53
53
  <div class="job_history_next_links">
54
- <a href="<%= u("job history/job_class_details") %>?<%=
54
+ <a href="<%= u("job_history/job_class_details") %>?<%=
55
55
  { class_name: class_name,
56
56
  "#{primary_type}_page_size" => page_size,
57
57
  "#{primary_type}_page_num" => [total_pages, page_num + 1].min,
@@ -62,7 +62,7 @@
62
62
  Next &gt;
63
63
  </a>
64
64
 
65
- <a href="<%= u("job history/job_class_details") %>?<%=
65
+ <a href="<%= u("job_history/job_class_details") %>?<%=
66
66
  { class_name: class_name,
67
67
  "#{primary_type}_page_size" => page_size,
68
68
  "#{primary_type}_page_num" => total_pages,
@@ -1,7 +1,7 @@
1
1
  <% summary_rows.each do |class_info| %>
2
2
  <tr<%= class_info.last_run && !class_info.last_run.succeeded? ? " class=\"job_history_error\"" : "" %>>
3
3
  <td>
4
- <a href="<%= u("job history") %>/job_class_details?class_name=<%= class_info.class_name %>">
4
+ <a href="<%= u("job_history") %>/job_class_details?class_name=<%= class_info.class_name %>">
5
5
  <%= class_info.class_name %>
6
6
  </a>
7
7
  </td>
@@ -9,7 +9,7 @@
9
9
 
10
10
  <% if total_pages > 1 %>
11
11
  <div class="job_history_prev_links">
12
- <a href="<%= u("job history/linear_history") %>?<%=
12
+ <a href="<%= u("job_history/linear_history") %>?<%=
13
13
  { "page_size" => page_size,
14
14
  "page_num" => 1 }.to_param %>"
15
15
  class="job_history_first_page"
@@ -17,7 +17,7 @@
17
17
  &lt;&lt; First
18
18
  </a>
19
19
 
20
- <a href="<%= u("job history/linear_history") %>?<%=
20
+ <a href="<%= u("job_history/linear_history") %>?<%=
21
21
  { "page_size" => page_size,
22
22
  "page_num" => [1, page_num - 1].max }.to_param %>"
23
23
  class="job_history_prev_page"
@@ -29,7 +29,7 @@
29
29
  <div class="job_history_pages">
30
30
  <% (first_page..last_page).each do |page_number| %>
31
31
  <% if page_number != page_num %>
32
- <a href="<%= u("job history/linear_history") %>?<%=
32
+ <a href="<%= u("job_history/linear_history") %>?<%=
33
33
  { "page_size" => page_size,
34
34
  "page_num" => page_number }.to_param %>"
35
35
  class="job_history_page">
@@ -42,7 +42,7 @@
42
42
  </div>
43
43
 
44
44
  <div class="job_history_next_links">
45
- <a href="<%= u("job history/linear_history") %>?<%=
45
+ <a href="<%= u("job_history/linear_history") %>?<%=
46
46
  { "page_size" => page_size,
47
47
  "page_num" => [total_pages, page_num + 1].min }.to_param %>"
48
48
  class="job_history_next_page"
@@ -50,7 +50,7 @@
50
50
  Next &gt;
51
51
  </a>
52
52
 
53
- <a href="<%= u("job history/linear_history") %>?<%=
53
+ <a href="<%= u("job_history/linear_history") %>?<%=
54
54
  { "page_size" => page_size,
55
55
  "page_num" => total_pages }.to_param %>"
56
56
  class="job_history_last_page"
@@ -1,5 +1,5 @@
1
1
  <div id="job_history_search_div">
2
- <form method="POST" action="<%= u("job history/#{job_search.search_type}") %>">
2
+ <form method="POST" action="<%= u("job_history/#{job_search.search_type}") %>">
3
3
  <% job_search.retry_search_settings(false).each do |setting_name, setting_value| %>
4
4
  <input type="hidden" name="<%= setting_name %>" value="<%= setting_value %>"/>
5
5
  <% end %>
@@ -8,7 +8,7 @@
8
8
 
9
9
  <div>
10
10
  <div class="job_history_linear_history_div">
11
- <a href="<%= u("job history") %>">
11
+ <a href="<%= u("job_history") %>">
12
12
  Job History
13
13
  </a>
14
14
  </div>
@@ -121,7 +121,7 @@
121
121
  </p>
122
122
  </div>
123
123
  <% else %>
124
- <form method="POST" action="<%= u("job history/purge_class") %>?<%= { class_name: @job_class_name }.to_param %>">
124
+ <form method="POST" action="<%= u("job_history/purge_class") %>?<%= { class_name: @job_class_name }.to_param %>">
125
125
  <input type="submit" name="" value="Purge all histories for <%= @job_class_name %>"/>
126
126
  </form>
127
127
  <% end %>
@@ -7,11 +7,11 @@
7
7
  <% job_details = Resque::Plugins::JobHistory::Job.new(@job_class_name, @job_id) %>
8
8
 
9
9
  <p>
10
- <a href="<%= u("job history") %>">
10
+ <a href="<%= u("job_history") %>">
11
11
  Job History
12
12
  </a>
13
13
  |
14
- <a href="<%= u("job history/job_class_details") %>?<%= { class_name: @job_class_name }.to_param %>">
14
+ <a href="<%= u("job_history/job_class_details") %>?<%= { class_name: @job_class_name }.to_param %>">
15
15
  <%= @job_class_name %>
16
16
  </a>
17
17
  </p>
@@ -68,19 +68,19 @@
68
68
  <br/>
69
69
 
70
70
  <% unless job_details.finished? %>
71
- <form method="POST" action="<%= u("job history/cancel_job") %>?<%=
71
+ <form method="POST" action="<%= u("job_history/cancel_job") %>?<%=
72
72
  { class_name: @job_class_name, job_id: @job_id }.to_param %>">
73
73
  <input type="submit" name="" value="Job is not running - Cancel job"/>
74
74
  </form>
75
75
  <% end %>
76
76
 
77
- <form method="POST" action="<%= u("job history/delete_job") %>?<%=
77
+ <form method="POST" action="<%= u("job_history/delete_job") %>?<%=
78
78
  { class_name: @job_class_name, job_id: @job_id }.to_param %>">
79
79
  <input type="submit" name="" value="Delete this run"/>
80
80
  </form>
81
81
 
82
82
  <% if Resque::Plugins::JobHistory::HistoryDetails.new(@job_class_name).class_name_valid?() %>
83
- <form method="POST" action="<%= u("job history/retry_job") %>?<%=
83
+ <form method="POST" action="<%= u("job_history/retry_job") %>?<%=
84
84
  { class_name: @job_class_name, job_id: @job_id }.to_param %>">
85
85
  <input type="submit" name="" value="Retry this run"/>
86
86
  </form>
@@ -6,7 +6,7 @@
6
6
 
7
7
  <div>
8
8
  <div class="job_history_linear_history_div">
9
- <a href="<%= u("job history/linear_history") %>">
9
+ <a href="<%= u("job_history/linear_history") %>">
10
10
  Linear History
11
11
  </a>
12
12
  </div>
@@ -24,7 +24,7 @@
24
24
  <div class="table_container">
25
25
  <table>
26
26
  <tr>
27
- <th><a href="<%= u("job history") %>?<%=
27
+ <th><a href="<%= u("job_history") %>?<%=
28
28
  { sort: "class_name",
29
29
  page_size: @page_size,
30
30
  page_num: @page_num,
@@ -32,7 +32,7 @@
32
32
  order_param("class_name", @sort_by, @sort_order) }.to_param %>">
33
33
  Class name
34
34
  </a></th>
35
- <th><a href="<%= u("job history") %>?<%=
35
+ <th><a href="<%= u("job_history") %>?<%=
36
36
  { sort: "num_running_jobs",
37
37
  page_size: @page_size,
38
38
  page_num: @page_num,
@@ -40,7 +40,7 @@
40
40
  order_param("num_running_jobs", @sort_by, @sort_order) }.to_param %>">
41
41
  Running
42
42
  </a></th>
43
- <th><a href="<%= u("job history") %>?<%=
43
+ <th><a href="<%= u("job_history") %>?<%=
44
44
  { sort: "total_run_jobs",
45
45
  page_size: @page_size,
46
46
  page_num: @page_num,
@@ -48,7 +48,7 @@
48
48
  order_param("total_run_jobs", @sort_by, @sort_order) }.to_param %>">
49
49
  Total Run
50
50
  </a></th>
51
- <th><a href="<%= u("job history") %>?<%=
51
+ <th><a href="<%= u("job_history") %>?<%=
52
52
  { sort: "total_finished_jobs",
53
53
  page_size: @page_size,
54
54
  page_num: @page_num,
@@ -56,7 +56,7 @@
56
56
  order_param("total_finished_jobs", @sort_by, @sort_order) }.to_param %>">
57
57
  Finished
58
58
  </a></th>
59
- <th><a href="<%= u("job history") %>?<%=
59
+ <th><a href="<%= u("job_history") %>?<%=
60
60
  { sort: "total_failed_jobs",
61
61
  page_size: @page_size,
62
62
  page_num: @page_num,
@@ -64,7 +64,7 @@
64
64
  order_param("total_failed_jobs", @sort_by, @sort_order) }.to_param %>">
65
65
  Failed
66
66
  </a></th>
67
- <th><a href="<%= u("job history") %>?<%=
67
+ <th><a href="<%= u("job_history") %>?<%=
68
68
  { sort: "start_time",
69
69
  page_size: @page_size,
70
70
  page_num: @page_num,
@@ -72,7 +72,7 @@
72
72
  order_param("start_time", @sort_by, @sort_order) }.to_param %>">
73
73
  Last Run Start
74
74
  </a></th>
75
- <th><a href="<%= u("job history") %>?<%=
75
+ <th><a href="<%= u("job_history") %>?<%=
76
76
  { sort: "duration",
77
77
  page_size: @page_size,
78
78
  page_num: @page_num,
@@ -80,7 +80,7 @@
80
80
  order_param("duration", @sort_by, @sort_order) }.to_param %>">
81
81
  Last Run Duration
82
82
  </a></th>
83
- <th><a href="<%= u("job history") %>?<%=
83
+ <th><a href="<%= u("job_history") %>?<%=
84
84
  { sort: "success",
85
85
  page_size: @page_size,
86
86
  page_num: @page_num,
@@ -101,7 +101,7 @@
101
101
  <br/>
102
102
 
103
103
  <div>
104
- <form method="POST" action="<%= u("job history/purge_all") %>">
104
+ <form method="POST" action="<%= u("job_history/purge_all") %>">
105
105
  <input type="submit" name="" value="Purge all histories"/>
106
106
  </form>
107
107
  </div>
@@ -4,7 +4,7 @@
4
4
 
5
5
  <div>
6
6
  <div class="job_history_linear_history_div">
7
- <a href="<%= u("job history") %>">
7
+ <a href="<%= u("job_history") %>">
8
8
  Job History
9
9
  </a>
10
10
  </div>
@@ -37,7 +37,7 @@
37
37
  <br/>
38
38
 
39
39
  <div>
40
- <form method="POST" action="<%= u("job history/purge_linear_history") %>">
40
+ <form method="POST" action="<%= u("job_history/purge_linear_history") %>">
41
41
  <input type="submit" name="" value="Purge linear histories"/>
42
42
  </form>
43
43
  </div>
@@ -4,7 +4,7 @@
4
4
 
5
5
  <div>
6
6
  <div class="job_history_linear_history_div">
7
- <a href="<%= u("job history") %>">
7
+ <a href="<%= u("job_history") %>">
8
8
  Job History
9
9
  </a>
10
10
  </div>
@@ -57,7 +57,7 @@
57
57
  <% end %>
58
58
 
59
59
  <% if @job_search.more_records? %>
60
- <form id="continue_search" method="POST" action="<%= u("job history/#{@job_search.search_type}") %>">
60
+ <form id="continue_search" method="POST" action="<%= u("job_history/#{@job_search.search_type}") %>">
61
61
  <% @job_search.search_settings(true).each do |setting_name, setting_value| %>
62
62
  <input type="hidden" name="<%= setting_name %>" value="<%= setting_value %>"/>
63
63
  <% end %>
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: resque-job_history
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.20
4
+ version: 0.0.23
5
5
  platform: ruby
6
6
  authors:
7
7
  - RealNobody
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-10-30 00:00:00.000000000 Z
11
+ date: 2022-05-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: resque
@@ -299,7 +299,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
299
299
  - !ruby/object:Gem::Version
300
300
  version: '0'
301
301
  requirements: []
302
- rubygems_version: 3.0.3
302
+ rubygems_version: 3.1.2
303
303
  signing_key:
304
304
  specification_version: 4
305
305
  summary: Keeps a history of run jobs by job.