good_job 2.3.1 → 2.4.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 +17 -1
- data/engine/app/helpers/good_job/application_helper.rb +4 -0
- data/engine/app/views/good_job/cron_schedules/index.html.erb +22 -0
- data/engine/app/views/good_job/shared/_executions_table.erb +1 -1
- data/engine/app/views/good_job/shared/_jobs_table.erb +1 -1
- data/engine/app/views/layouts/good_job/base.html.erb +1 -1
- data/lib/good_job/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9a8150ef0c4bf16e9091908964e629175bf1b3543c0955e796be67c46a842a55
|
4
|
+
data.tar.gz: 707260ea8989fa5d108b533c0b61a39741be036de397980d37a725e1e188d6f2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9b6b1292908f04a1e1bc72a541c1e8751856b8deb836046660290d766494f94d54f37b6070b614690c59ee34849c1051a88aa5f0c66f1c5931b765d2d9e0c685
|
7
|
+
data.tar.gz: a3b6ed6bb8032e0ee772186b6846af655fee07e097bc2dc0be82185d8369141f6f14c611223c2e5c5239a2287dea4b2969d90ededb1e817b64f253a0b2b48699
|
data/CHANGELOG.md
CHANGED
@@ -1,13 +1,29 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## [v2.4.0](https://github.com/bensheldon/good_job/tree/v2.4.0) (2021-10-02)
|
4
|
+
|
5
|
+
[Full Changelog](https://github.com/bensheldon/good_job/compare/v2.3.1...v2.4.0)
|
6
|
+
|
7
|
+
**Implemented enhancements:**
|
8
|
+
|
9
|
+
- Display schedule time relative to now. [\#394](https://github.com/bensheldon/good_job/pull/394) ([morgoth](https://github.com/morgoth))
|
10
|
+
- Display cron schedules properties in dashboard [\#391](https://github.com/bensheldon/good_job/pull/391) ([aried3r](https://github.com/aried3r))
|
11
|
+
|
12
|
+
**Fixed bugs:**
|
13
|
+
|
14
|
+
- Correct icon for alert flash [\#395](https://github.com/bensheldon/good_job/pull/395) ([morgoth](https://github.com/morgoth))
|
15
|
+
|
3
16
|
## [v2.3.1](https://github.com/bensheldon/good_job/tree/v2.3.1) (2021-09-30)
|
4
17
|
|
5
18
|
[Full Changelog](https://github.com/bensheldon/good_job/compare/v2.3.0...v2.3.1)
|
6
19
|
|
20
|
+
**Fixed bugs:**
|
21
|
+
|
22
|
+
- Wrap Scheduler task execution with Rails `reloader` instead of `executor` to avoid database connection changing during code reload [\#389](https://github.com/bensheldon/good_job/pull/389) ([bensheldon](https://github.com/bensheldon))
|
23
|
+
|
7
24
|
**Merged pull requests:**
|
8
25
|
|
9
26
|
- Log Cleanup thread tests, introduce "Slow" ExampleJob type, refactor ExampleJob types, run cron and log Postgres warnings in GoodJob Development harness [\#390](https://github.com/bensheldon/good_job/pull/390) ([bensheldon](https://github.com/bensheldon))
|
10
|
-
- Wrap Scheduler task execution with Rails `reloader` instead of `executor` to avoid database connection changing during code reload [\#389](https://github.com/bensheldon/good_job/pull/389) ([bensheldon](https://github.com/bensheldon))
|
11
27
|
|
12
28
|
## [v2.3.0](https://github.com/bensheldon/good_job/tree/v2.3.0) (2021-09-25)
|
13
29
|
|
@@ -1,5 +1,9 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
module GoodJob
|
3
3
|
module ApplicationHelper
|
4
|
+
def relative_time(timestamp)
|
5
|
+
text = timestamp.future? ? "in #{time_ago_in_words(timestamp)}" : "#{time_ago_in_words(timestamp)} ago"
|
6
|
+
tag.time(text, datetime: timestamp, title: timestamp)
|
7
|
+
end
|
4
8
|
end
|
5
9
|
end
|
@@ -5,6 +5,13 @@
|
|
5
5
|
<thead>
|
6
6
|
<th>Cron Job Name</th>
|
7
7
|
<th>Configuration</th>
|
8
|
+
<th>
|
9
|
+
Set
|
10
|
+
<%= tag.button "Toggle", type: "button", class: "btn btn-sm btn-outline-primary", role: "button",
|
11
|
+
data: { bs_toggle: "collapse", bs_target: ".job-properties" },
|
12
|
+
aria: { expanded: false, controls: @cron_schedules.map { |job_key, _| "##{job_key.to_param}" }.join(" ") }
|
13
|
+
%>
|
14
|
+
</th>
|
8
15
|
<th>Class</th>
|
9
16
|
<th>Description</th>
|
10
17
|
<th>Next scheduled</th>
|
@@ -14,6 +21,21 @@
|
|
14
21
|
<tr>
|
15
22
|
<td class="font-monospace"><%= job_key %></td>
|
16
23
|
<td class="font-monospace"><%= job[:cron] %></td>
|
24
|
+
<td>
|
25
|
+
<%=
|
26
|
+
case job[:set]
|
27
|
+
when NilClass
|
28
|
+
"None"
|
29
|
+
when Proc
|
30
|
+
"Lambda/Callable"
|
31
|
+
when Hash
|
32
|
+
tag.button("Preview", type: "button", class: "btn btn-sm btn-outline-primary", role: "button",
|
33
|
+
data: { bs_toggle: "collapse", bs_target: "##{job_key.to_param}" },
|
34
|
+
aria: { expanded: false, controls: job_key.to_param }) +
|
35
|
+
tag.pre(JSON.pretty_generate(job[:set]), id: job_key.to_param, class: "collapse job-properties")
|
36
|
+
end
|
37
|
+
%>
|
38
|
+
</td>
|
17
39
|
<td class="font-monospace"><%= job[:class] %></td>
|
18
40
|
<td><%= job[:description] %></td>
|
19
41
|
<td><%= Fugit.parse_cron(job[:cron]).next_time.to_local_time %></td>
|
@@ -34,7 +34,7 @@
|
|
34
34
|
</td>
|
35
35
|
<td><%= execution.serialized_params['job_class'] %></td>
|
36
36
|
<td><%= execution.queue_name %></td>
|
37
|
-
<td><%= execution.scheduled_at || execution.created_at %></td>
|
37
|
+
<td><%= relative_time(execution.scheduled_at || execution.created_at) %></td>
|
38
38
|
<td class="text-break"><%= truncate(execution.error, length: 1_000) %></td>
|
39
39
|
<td>
|
40
40
|
<%= tag.button "Preview", type: "button", class: "btn btn-sm btn-outline-primary", role: "button",
|
@@ -33,7 +33,7 @@
|
|
33
33
|
</td>
|
34
34
|
<td><%= job.job_class %></td>
|
35
35
|
<td><%= job.queue_name %></td>
|
36
|
-
<td><%= job.scheduled_at || job.created_at %></td>
|
36
|
+
<td><%= relative_time(job.scheduled_at || job.created_at) %></td>
|
37
37
|
<td><%= job.executions_count %></td>
|
38
38
|
<td class="text-break"><%= truncate(job.recent_error, length: 1_000) %></td>
|
39
39
|
<td>
|
@@ -68,7 +68,7 @@
|
|
68
68
|
</div>
|
69
69
|
<% elsif alert %>
|
70
70
|
<div class="alert alert-warning alert-dismissible fade show d-flex align-items-center offset-md-3 col-6" role="alert">
|
71
|
-
<%= render "good_job/shared/icons/
|
71
|
+
<%= render "good_job/shared/icons/exclamation", class: "flex-shrink-0 me-2" %>
|
72
72
|
<div><%= alert %></div>
|
73
73
|
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
|
74
74
|
</div>
|
data/lib/good_job/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: good_job
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben Sheldon
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-10-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activejob
|