resque-job_history 0.0.22 → 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: 6d328ea1b14c7876088234d1c4d3640423ab2f8059006eaadbf908ca73275afa
4
- data.tar.gz: d59d30e5ddc0d79bb6812b17f5f5236aa8cda1ea973c699ce32576718257bbcf
3
+ metadata.gz: 6a7d4b67d242c94799ded788270e28fcd0b0c8ec770e66bb14a2a4c334c57e8c
4
+ data.tar.gz: 8771dbe786146ddf9704214b36a2bbd47ce891aa5cd932c6501d815947536e80
5
5
  SHA512:
6
- metadata.gz: f0ae0984ef34a9a40519d68cbc9e0338b414df97b52f130dec1e3c5a2e547bccdd84330f2966cd8518c4731bdba3684ce408034cadebb9b9ca96f523649d2809
7
- data.tar.gz: da4a3ce71e67a2aaeca3784fb29accf6075aeb70b2c087d4790b3713997626aa14d9ade0a02efe1152f58a4a01901906ad701f5598a199e037076cbe4df1a267
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
@@ -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.22
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-11-01 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.