good_job 1.3.4 → 1.5.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7c7d64f21fbabba859d20d0a277d0a963672fcfde1284881b0130b1e05e62252
4
- data.tar.gz: b7dbc95191a2bf115176f0e8ce09b8f7c997a2cb852fb673e5fee17c241434be
3
+ metadata.gz: 89ef994e63adf5fe8dcbcdd230d9669d21c2cb6d9c62da622c8d8a197fcb3cef
4
+ data.tar.gz: 6ed6d2cc6f75c5b4dc6976f3e360a5aeb27e3488fbd8035d086058b40d693025
5
5
  SHA512:
6
- metadata.gz: a0e58bf60a8008617703b575d55cdefd94fa9405d8d7cb034a75013b3a3fc8e4205833cf818d03caa137470b9ff431258d19e166e5d56f83a70667c3c484d904
7
- data.tar.gz: adc2a494ea2f4e3e4ac7f569b013edade8a223f1e54474835cba34c6ac6233760f94bbbffb62f0ed37a119f8f15dfd1310a87b304483bbae72ecd0129f10f439
6
+ metadata.gz: f8d856f3797236bffecfffe5bcb58599aa0b2f843962fe09032eb0606d432d1f379dd564d00e29512bd6e3ca0c26c261401eed4b45806f21c660d9cd1a9a4838
7
+ data.tar.gz: cd223dc763e1bb56d746f957aec29403ed78b6d89619fd4d4b23148d2f78a86c452e29e48249cf408cc4fff7c0ee564eb7032d9b02b24239a2d0215f40df5194
@@ -1,18 +1,103 @@
1
1
  # Changelog
2
2
 
3
+ ## [v1.5.0](https://github.com/bensheldon/good_job/tree/v1.5.0) (2021-01-17)
4
+
5
+ [Full Changelog](https://github.com/bensheldon/good_job/compare/v1.4.1...v1.5.0)
6
+
7
+ **Implemented enhancements:**
8
+
9
+ - Create Web UI Dashboard [\#50](https://github.com/bensheldon/good_job/issues/50)
10
+
11
+ **Closed issues:**
12
+
13
+ - JRuby Support [\#160](https://github.com/bensheldon/good_job/issues/160)
14
+
15
+ **Merged pull requests:**
16
+
17
+ - Update bundler version to 2.2.5 [\#200](https://github.com/bensheldon/good_job/pull/200) ([bensheldon](https://github.com/bensheldon))
18
+ - Configure GoodJob via `Rails.application.config` instead of recommending `GoodJob::Adapter.new` [\#199](https://github.com/bensheldon/good_job/pull/199) ([bensheldon](https://github.com/bensheldon))
19
+ - Update GH Test Matrix with minimum & latest JRuby version [\#197](https://github.com/bensheldon/good_job/pull/197) ([tedhexaflow](https://github.com/tedhexaflow))
20
+ - Fix JRuby version number [\#193](https://github.com/bensheldon/good_job/pull/193) ([tedhexaflow](https://github.com/tedhexaflow))
21
+
22
+ ## [v1.4.1](https://github.com/bensheldon/good_job/tree/v1.4.1) (2021-01-09)
23
+
24
+ [Full Changelog](https://github.com/bensheldon/good_job/compare/v1.4.0...v1.4.1)
25
+
26
+ **Fixed bugs:**
27
+
28
+ - Do not add lib/generators to Zeitwerk autoloader [\#192](https://github.com/bensheldon/good_job/pull/192) ([bensheldon](https://github.com/bensheldon))
29
+
30
+ **Closed issues:**
31
+
32
+ - Issues with Heroku and Good Job [\#184](https://github.com/bensheldon/good_job/issues/184)
33
+
34
+ **Merged pull requests:**
35
+
36
+ - Add missing YARD docs and Dashboard screenshot [\#191](https://github.com/bensheldon/good_job/pull/191) ([bensheldon](https://github.com/bensheldon))
37
+
38
+ ## [v1.4.0](https://github.com/bensheldon/good_job/tree/v1.4.0) (2020-12-31)
39
+
40
+ [Full Changelog](https://github.com/bensheldon/good_job/compare/v1.3.6...v1.4.0)
41
+
42
+ **Implemented enhancements:**
43
+
44
+ - Format serialized params to ease reading [\#170](https://github.com/bensheldon/good_job/pull/170) ([morgoth](https://github.com/morgoth))
45
+ - Add JRuby support [\#167](https://github.com/bensheldon/good_job/pull/167) ([bensheldon](https://github.com/bensheldon))
46
+
47
+ ## [v1.3.6](https://github.com/bensheldon/good_job/tree/v1.3.6) (2020-12-30)
48
+
49
+ [Full Changelog](https://github.com/bensheldon/good_job/compare/v1.3.5...v1.3.6)
50
+
51
+ **Implemented enhancements:**
52
+
53
+ - Call GoodJob.on\_thread\_error when Notifier thread raises exception [\#185](https://github.com/bensheldon/good_job/pull/185) ([bensheldon](https://github.com/bensheldon))
54
+ - Improve dashboard UI, fix button state, add unfiltering [\#181](https://github.com/bensheldon/good_job/pull/181) ([bensheldon](https://github.com/bensheldon))
55
+
56
+ **Fixed bugs:**
57
+
58
+ - Replace ActiveRecord execute usage and avoid potential memory leakage [\#187](https://github.com/bensheldon/good_job/issues/187)
59
+ - Does good\_job hold on to advisory locks for finished jobs? [\#177](https://github.com/bensheldon/good_job/issues/177)
60
+
61
+ **Merged pull requests:**
62
+
63
+ - Run tests with Rails default configuration to enable Zeitwerk [\#190](https://github.com/bensheldon/good_job/pull/190) ([bensheldon](https://github.com/bensheldon))
64
+ - Update all Lockable queries to use exec\_query instead of execute; clear async\_exec results [\#189](https://github.com/bensheldon/good_job/pull/189) ([bensheldon](https://github.com/bensheldon))
65
+ - Have Lockable\#advisory\_locked? directly query pg\_locks table [\#188](https://github.com/bensheldon/good_job/pull/188) ([bensheldon](https://github.com/bensheldon))
66
+ - Update development gems, including Rails v6.1 and Rails HEAD [\#186](https://github.com/bensheldon/good_job/pull/186) ([bensheldon](https://github.com/bensheldon))
67
+ - Update Appraisals for Rails 6.1 [\#183](https://github.com/bensheldon/good_job/pull/183) ([bensheldon](https://github.com/bensheldon))
68
+ - Add Ruby 3 to CI test matrix [\#182](https://github.com/bensheldon/good_job/pull/182) ([bensheldon](https://github.com/bensheldon))
69
+
70
+ ## [v1.3.5](https://github.com/bensheldon/good_job/tree/v1.3.5) (2020-12-17)
71
+
72
+ [Full Changelog](https://github.com/bensheldon/good_job/compare/v1.3.4...v1.3.5)
73
+
74
+ **Fixed bugs:**
75
+
76
+ - Ensure advisory lock CTE is MATERIALIZED on Postgres v12+ [\#179](https://github.com/bensheldon/good_job/pull/179) ([bensheldon](https://github.com/bensheldon))
77
+ - Ensure that deleted jobs are unlocked [\#178](https://github.com/bensheldon/good_job/pull/178) ([bensheldon](https://github.com/bensheldon))
78
+
79
+ **Closed issues:**
80
+
81
+ - not running jobs [\#168](https://github.com/bensheldon/good_job/issues/168)
82
+ - how to run good\_job on a separate machine [\#162](https://github.com/bensheldon/good_job/issues/162)
83
+
84
+ **Merged pull requests:**
85
+
86
+ - Add Appraisal for Rails 6.1-rc2 [\#175](https://github.com/bensheldon/good_job/pull/175) ([bensheldon](https://github.com/bensheldon))
87
+
3
88
  ## [v1.3.4](https://github.com/bensheldon/good_job/tree/v1.3.4) (2020-12-02)
4
89
 
5
90
  [Full Changelog](https://github.com/bensheldon/good_job/compare/v1.3.3...v1.3.4)
6
91
 
7
- **Merged pull requests:**
92
+ **Fixed bugs:**
8
93
 
9
- - Fix job ordering. [\#174](https://github.com/bensheldon/good_job/pull/174) ([morgoth](https://github.com/morgoth))
94
+ - Fix job ordering for Rails 6.1 [\#174](https://github.com/bensheldon/good_job/pull/174) ([morgoth](https://github.com/morgoth))
10
95
 
11
96
  ## [v1.3.3](https://github.com/bensheldon/good_job/tree/v1.3.3) (2020-12-01)
12
97
 
13
98
  [Full Changelog](https://github.com/bensheldon/good_job/compare/v1.3.2...v1.3.3)
14
99
 
15
- **Merged pull requests:**
100
+ **Implemented enhancements:**
16
101
 
17
102
  - UI: Admin UI with filters and space efficient layout [\#173](https://github.com/bensheldon/good_job/pull/173) ([zealot128](https://github.com/zealot128))
18
103
 
@@ -32,7 +117,6 @@
32
117
  **Implemented enhancements:**
33
118
 
34
119
  - Extract polling from scheduler into Polling object [\#128](https://github.com/bensheldon/good_job/issues/128)
35
- - Format serialized params to ease reading [\#170](https://github.com/bensheldon/good_job/pull/170) ([morgoth](https://github.com/morgoth))
36
120
 
37
121
  **Fixed bugs:**
38
122
 
@@ -59,9 +143,6 @@
59
143
  **Implemented enhancements:**
60
144
 
61
145
  - Lengthen default poll interval from 1 to 5 seconds [\#156](https://github.com/bensheldon/good_job/pull/156) ([bensheldon](https://github.com/bensheldon))
62
-
63
- **Merged pull requests:**
64
-
65
146
  - Rename reperform\_jobs\_on\_standard\_error to retry\_on\_unhandled\_error [\#154](https://github.com/bensheldon/good_job/pull/154) ([morgoth](https://github.com/morgoth))
66
147
 
67
148
  ## [v1.2.6](https://github.com/bensheldon/good_job/tree/v1.2.6) (2020-09-29)
@@ -121,6 +202,7 @@
121
202
  - Correct example on how to configure multiple queues by command line. [\#135](https://github.com/bensheldon/good_job/pull/135) ([morgoth](https://github.com/morgoth))
122
203
  - Update ActionMailer Job class, to match the default [\#130](https://github.com/bensheldon/good_job/pull/130) ([morgoth](https://github.com/morgoth))
123
204
  - Add initial Engine scaffold [\#125](https://github.com/bensheldon/good_job/pull/125) ([bensheldon](https://github.com/bensheldon))
205
+ - Zeitwerk Loader Implementation [\#123](https://github.com/bensheldon/good_job/pull/123) ([gadimbaylisahil](https://github.com/gadimbaylisahil))
124
206
  - Update code-level documentation [\#111](https://github.com/bensheldon/good_job/pull/111) ([bensheldon](https://github.com/bensheldon))
125
207
 
126
208
  ## [v1.2.4](https://github.com/bensheldon/good_job/tree/v1.2.4) (2020-09-01)
@@ -144,7 +226,6 @@
144
226
 
145
227
  **Merged pull requests:**
146
228
 
147
- - Zeitwerk Loader Implementation [\#123](https://github.com/bensheldon/good_job/pull/123) ([gadimbaylisahil](https://github.com/gadimbaylisahil))
148
229
  - Remove unused PgLocks class [\#120](https://github.com/bensheldon/good_job/pull/120) ([gadimbaylisahil](https://github.com/gadimbaylisahil))
149
230
  - Fix readme CommandLine option links [\#115](https://github.com/bensheldon/good_job/pull/115) ([gadimbaylisahil](https://github.com/gadimbaylisahil))
150
231
  - Have YARD render markdown files with GFM \(Github Flavored Markdown\) [\#113](https://github.com/bensheldon/good_job/pull/113) ([bensheldon](https://github.com/bensheldon))
@@ -171,11 +252,13 @@
171
252
  **Implemented enhancements:**
172
253
 
173
254
  - Run Github Action tests against Ruby 2.5, 2.6, 2.7 [\#100](https://github.com/bensheldon/good_job/issues/100)
255
+ - Name the thread pools [\#96](https://github.com/bensheldon/good_job/pull/96) ([sj26](https://github.com/sj26))
174
256
 
175
257
  **Fixed bugs:**
176
258
 
177
259
  - Freezes puma on code change [\#95](https://github.com/bensheldon/good_job/issues/95)
178
260
  - Ruby 2.7 keyword arguments warning [\#93](https://github.com/bensheldon/good_job/issues/93)
261
+ - Return to using executor.wrap around Scheduler execution task [\#99](https://github.com/bensheldon/good_job/pull/99) ([bensheldon](https://github.com/bensheldon))
179
262
 
180
263
  **Closed issues:**
181
264
 
@@ -185,10 +268,8 @@
185
268
 
186
269
  - Use more ActiveRecord in Lockable and not connection.execute [\#102](https://github.com/bensheldon/good_job/pull/102) ([bensheldon](https://github.com/bensheldon))
187
270
  - Run CI tests on Ruby 2.5, 2.6, and 2.7 [\#101](https://github.com/bensheldon/good_job/pull/101) ([arku](https://github.com/arku))
188
- - Return to using executor.wrap around Scheduler execution task [\#99](https://github.com/bensheldon/good_job/pull/99) ([bensheldon](https://github.com/bensheldon))
189
271
  - Fix Ruby 2.7 keyword arguments warning [\#98](https://github.com/bensheldon/good_job/pull/98) ([arku](https://github.com/arku))
190
272
  - Remove executor/reloader for less interlocking [\#97](https://github.com/bensheldon/good_job/pull/97) ([sj26](https://github.com/sj26))
191
- - Name the thread pools [\#96](https://github.com/bensheldon/good_job/pull/96) ([sj26](https://github.com/sj26))
192
273
  - Add test for `rails g good\_job:install` [\#94](https://github.com/bensheldon/good_job/pull/94) ([arku](https://github.com/arku))
193
274
 
194
275
  ## [v1.2.1](https://github.com/bensheldon/good_job/tree/v1.2.1) (2020-08-21)
@@ -334,6 +415,10 @@
334
415
 
335
416
  [Full Changelog](https://github.com/bensheldon/good_job/compare/v0.8.2...v0.9.0)
336
417
 
418
+ **Merged pull requests:**
419
+
420
+ - Allow preservation of finished job records [\#46](https://github.com/bensheldon/good_job/pull/46) ([bensheldon](https://github.com/bensheldon))
421
+
337
422
  ## [v0.8.2](https://github.com/bensheldon/good_job/tree/v0.8.2) (2020-07-18)
338
423
 
339
424
  [Full Changelog](https://github.com/bensheldon/good_job/compare/v0.8.1...v0.8.2)
@@ -361,7 +446,6 @@
361
446
 
362
447
  **Merged pull requests:**
363
448
 
364
- - Allow preservation of finished job records [\#46](https://github.com/bensheldon/good_job/pull/46) ([bensheldon](https://github.com/bensheldon))
365
449
  - Replace Adapter inline boolean kwarg with execution\_mode instead [\#41](https://github.com/bensheldon/good_job/pull/41) ([bensheldon](https://github.com/bensheldon))
366
450
 
367
451
  ## [v0.7.0](https://github.com/bensheldon/good_job/tree/v0.7.0) (2020-07-16)
data/README.md CHANGED
@@ -30,12 +30,13 @@ For more of the story of GoodJob, read the [introductory blog post](https://isla
30
30
  ## Table of contents
31
31
 
32
32
  - [Set up](#set-up)
33
+ - [Compatibility](#compatibility)
33
34
  - [Configuration](#configuration)
34
35
  - [Command-line options](#command-line-options)
35
36
  - [`good_job start`](#good_job-start)
36
37
  - [`good_job cleanup_preserved_jobs`](#good_job-cleanup_preserved_jobs)
37
- - [Adapter options](#adapter-options)
38
- - [Global options](#global-options)
38
+ - [Configuration options](#configuration-options)
39
+ - [Global options](#global-options)pter
39
40
  - [Dashboard](#dashboard)
40
41
  - [Go deeper](#go-deeper)
41
42
  - [Exceptions, retries, and reliability](#exceptions-retries-and-reliability)
@@ -123,6 +124,12 @@ For more of the story of GoodJob, read the [introductory blog post](https://isla
123
124
 
124
125
  Additional configuration is likely necessary, see the reference below for async configuration.
125
126
 
127
+ ## Compatibility
128
+
129
+ - **Ruby on Rails:** 5.2+
130
+ - **Ruby:** MRI 2.5+. JRuby 9.2.13+ (_JRuby's `activerecord-jdbcpostgresql-adapter` gem does not support Postgres LISTEN/NOTIFY)._
131
+ - **Postgres:** 9.6+
132
+
126
133
  ## Configuration
127
134
 
128
135
  ### Command-line options
@@ -182,9 +189,31 @@ If you are preserving job records this way, use this command regularly
182
189
  to delete old records and preserve space in your database.
183
190
  ```
184
191
 
185
- ### Adapter options
192
+ ### Configuration options
193
+
194
+ To use GoodJob, you can set `config.active_job.queue_adapter` to a `:good_job`.
195
+
196
+ Additional configuration can be provided via `config.good_job.OPTION = ...` for example:
186
197
 
187
- To use GoodJob, you can set `config.active_job.queue_adapter` to a `:good_job` or to an instance of `GoodJob::Adapter`, which you can configure with several options:
198
+ ```ruby
199
+ # config/application.rb
200
+
201
+ config.active_job.queue_adapter = :good_job
202
+
203
+ # Configure options individually...
204
+ config.good_job.execution_mode = :async
205
+ config.good_job.max_threads = 5
206
+ config.good_job.poll_interval = 30 # seconds
207
+
208
+ # ...or all at once.
209
+ config.good_job = {
210
+ execution_mode: :async,
211
+ max_threads: 5,
212
+ poll_interval: 30,
213
+ }
214
+ ```
215
+
216
+ Available configuration options are:
188
217
 
189
218
  - `execution_mode` (symbol) specifies how and where jobs should be executed. You can also set this with the environment variable `GOOD_JOB_EXECUTION_MODE`. It can be any one of:
190
219
  - `:inline` executes jobs immediately in whatever process queued them (usually the web server process). This should only be used in test and development environments.
@@ -194,17 +223,21 @@ To use GoodJob, you can set `config.active_job.queue_adapter` to a `:good_job` o
194
223
  - `queues` (string) determines which queues to execute jobs from when `execution_mode` is set to `:async`. See the description of `good_job start` for more details on the format of this string. You can also set this with the environment variable `GOOD_JOB_QUEUES`.
195
224
  - `poll_interval` (integer) sets the number of seconds between polls for jobs when `execution_mode` is set to `:async`. You can also set this with the environment variable `GOOD_JOB_POLL_INTERVAL`.
196
225
 
197
- Using the symbol instead of explicitly configuring the options above (i.e. setting `config.active_job.queue_adapter = :good_job`) is equivalent to:
226
+ By default, GoodJob configures the following execution modes per environment:
198
227
 
199
228
  ```ruby
229
+
200
230
  # config/environments/development.rb
201
- config.active_job.queue_adapter = GoodJob::Adapter.new(execution_mode: :inline)
231
+ config.active_job.queue_adapter = :good_job
232
+ config.good_job.execution_mode = :inline
202
233
 
203
234
  # config/environments/test.rb
204
- config.active_job.queue_adapter = GoodJob::Adapter.new(execution_mode: :inline)
235
+ config.active_job.queue_adapter = :good_job
236
+ config.good_job.execution_mode = :inline
205
237
 
206
238
  # config/environments/production.rb
207
- config.active_job.queue_adapter = GoodJob::Adapter.new(execution_mode: :external)
239
+ config.active_job.queue_adapter = :good_job
240
+ config.good_job.execution_mode = :external
208
241
  ```
209
242
 
210
243
  ### Global options
@@ -227,6 +260,8 @@ GoodJob.on_thread_error = -> (exception) { Raven.capture_exception(exception) }
227
260
 
228
261
  ### Dashboard
229
262
 
263
+ ![Dashboard UI](https://github.com/bensheldon/good_job/raw/main/SCREENSHOT.png)
264
+
230
265
  _🚧 GoodJob's dashboard is a work in progress. Please contribute ideas and code on [Github](https://github.com/bensheldon/good_job/issues)._
231
266
 
232
267
  GoodJob includes a Dashboard as a mountable `Rails::Engine`.
@@ -433,14 +468,24 @@ pool: <%= [ENV.fetch("RAILS_MAX_THREADS", 5).to_i, ENV.fetch("GOOD_JOB_MAX_THREA
433
468
 
434
469
  GoodJob can execute jobs "async" in the same process as the webserver (e.g. `bin/rail s`). GoodJob's async execution mode offers benefits of economy by not requiring a separate job worker process, but with the tradeoff of increased complexity. Async mode can be configured in two ways:
435
470
 
436
- - Directly configure the ActiveJob adapter:
471
+ - Via Rails configuration:
437
472
 
438
473
  ```ruby
439
474
  # config/environments/production.rb
440
- config.active_job.queue_adapter = GoodJob::Adapter.new(execution_mode: :async, max_threads: 4, poll_interval: 30)
475
+ config.active_job.queue_adapter = :good_job
476
+
477
+ # To change the execution mode
478
+ config.good_job.execution_mode = :async
479
+
480
+ # Or with more configuration
481
+ config.good_job = {
482
+ execution_mode: :async,
483
+ max_threads: 4,
484
+ poll_interval: 30
485
+ }
441
486
  ```
442
487
 
443
- - Or, when using `...queue_adapter = :good_job`, via environment variables:
488
+ - Or, with environment variables:
444
489
 
445
490
  ```bash
446
491
  $ GOOD_JOB_EXECUTION_MODE=async GOOD_JOB_MAX_THREADS=4 GOOD_JOB_POLL_INTERVAL=30 bin/rails server
@@ -42,11 +42,11 @@ module GoodJob
42
42
  GoodJob::Job.group("serialized_params->>'job_class'").count
43
43
  end
44
44
 
45
- def to_query(override)
45
+ def to_params(override)
46
46
  {
47
47
  state: params[:state],
48
48
  job_class: params[:job_class],
49
- }.merge(override).delete_if { |_, v| v.nil? }.to_query
49
+ }.merge(override).delete_if { |_, v| v.nil? }
50
50
  end
51
51
  end
52
52
 
@@ -8,18 +8,30 @@
8
8
  <small>Filter by job class</small>
9
9
  <br>
10
10
  <% @filter.job_classes.each do |name, count| %>
11
- <a href='<%= request.path + "?#{@filter.to_query(job_class: name)}" %>' class='btn btn-sm btn-outline-secondary <%= "active" if params[:job_class] == name %>'>
12
- <%= name %> (<%= count %>)
13
- </a>
11
+ <% if params[:job_class] == name %>
12
+ <%= link_to(root_path(@filter.to_params(job_class: nil)), class: 'btn btn-sm btn-outline-secondary active', role: "button", "aria-pressed": true) do %>
13
+ <%= name %> (<%= count %>)
14
+ <% end %>
15
+ <% else %>
16
+ <%= link_to(root_path(@filter.to_params(job_class: name)), class: 'btn btn-sm btn-outline-secondary', role: "button") do %>
17
+ <%= name %> (<%= count %>)
18
+ <% end %>
19
+ <% end %>
14
20
  <% end %>
15
21
  </div>
16
22
  <div>
17
23
  <small>Filter by state</small>
18
24
  <br>
19
25
  <% @filter.states.each do |name, count| %>
20
- <a href='<%= request.path + "?#{@filter.to_query(state: name)}" %>' class='btn btn-sm btn-outline-secondary <%= "active" if params[:state] == name %>'>
21
- <%= name %> (<%= count %>)
22
- </a>
26
+ <% if params[:state] == name %>
27
+ <%= link_to(root_path(@filter.to_params(state: nil)), class: 'btn btn-sm btn-outline-secondary active', role: "button", "aria-pressed": true) do %>
28
+ <%= name %> (<%= count %>)
29
+ <% end %>
30
+ <% else %>
31
+ <%= link_to(root_path(@filter.to_params(state: name)), class: 'btn btn-sm btn-outline-secondary', role: "button") do %>
32
+ <%= name %> (<%= count %>)
33
+ <% end %>
34
+ <% end %>
23
35
  <% end %>
24
36
  </div>
25
37
  </div>
@@ -28,7 +40,7 @@
28
40
  <% if @filter.jobs.present? %>
29
41
  <%= render 'shared/jobs_table', jobs: @filter.jobs %>
30
42
 
31
- <nav aria-label="Job pagination">
43
+ <nav aria-label="Job pagination" class="mt-3">
32
44
  <ul class="pagination">
33
45
  <li class="page-item">
34
46
  <%= link_to({ after_scheduled_at: (@filter.last.scheduled_at || @filter.last.created_at), after_id: @filter.last.id }, class: "page-link") do %>
@@ -1,19 +1,19 @@
1
1
  <!DOCTYPE html>
2
2
  <html>
3
3
  <head>
4
- <title>Good job</title>
4
+ <title>Good Job Dashboard</title>
5
5
  <%= csrf_meta_tags %>
6
6
  <%= csp_meta_tag %>
7
7
 
8
8
  <style>
9
- <%= render "vendor/bootstrap/bootstrap.css" %>
10
- <%= render "vendor/chartist/chartist.css" %>
11
- <%= render "assets/style.css" %>
9
+ <%== render file: GoodJob::Engine.root.join("app", "assets", "vendor", "bootstrap", "bootstrap.css") %>
10
+ <%== render file: GoodJob::Engine.root.join("app", "assets", "vendor", "chartist", "chartist.css") %>
11
+ <%== render file: GoodJob::Engine.root.join("app", "assets", "style.css") %>
12
12
  </style>
13
13
 
14
14
  <script>
15
- <%= render "vendor/bootstrap/bootstrap-native.js" %>
16
- <%= render "vendor/chartist/chartist.js" %>
15
+ <%== render file: GoodJob::Engine.root.join("app", "assets", "vendor", "bootstrap", "bootstrap-native.js") %>
16
+ <%== render file: GoodJob::Engine.root.join("app", "assets", "vendor", "chartist", "chartist.js") %>
17
17
  </script>
18
18
  </head>
19
19
  <body>
@@ -1,7 +1,7 @@
1
1
  <div id="chart"></div>
2
2
 
3
3
  <script>
4
- new Chartist.Line('#chart', <%= raw chart_data.to_json %>, {
4
+ new Chartist.Line('#chart', <%== chart_data.to_json %>, {
5
5
  height: '300px',
6
6
  fullWidth: true,
7
7
  chartPadding: {
@@ -1,26 +1,28 @@
1
- <div class="table-responsive">
2
- <table class="table table-bordered table-hover table-sm">
3
- <thead>
4
- <th>GoodJob ID</th>
5
- <th>ActiveJob ID</th>
6
- <th>Job Class</th>
7
- <th>Queue</th>
8
- <th>Scheduled At</th>
9
- <th>Error</th>
10
- <th>ActiveJob Params</th>
11
- </thead>
12
- <tbody>
13
- <% jobs.each do |job| %>
14
- <tr id="<%= dom_id(job) %>">
15
- <td><%= link_to job.id, active_job_path(job.serialized_params['job_id'], anchor: dom_id(job)) %></td>
16
- <td><%= link_to job.serialized_params['job_id'], active_job_path(job.serialized_params['job_id']) %></td>
17
- <td><%= job.serialized_params['job_class'] %></td>
18
- <td><%= job.queue_name %></td>
19
- <td><%= job.scheduled_at || job.created_at %></td>
20
- <td><%= job.error %></td>
21
- <td><pre><%= JSON.pretty_generate(job.serialized_params) %></pre></td>
22
- </tr>
23
- <% end %>
24
- </tbody>
25
- </table>
1
+ <div class="card my-3">
2
+ <div class="table-responsive">
3
+ <table class="table card-table table-bordered table-hover table-sm mb-0">
4
+ <thead>
5
+ <th>GoodJob ID</th>
6
+ <th>ActiveJob ID</th>
7
+ <th>Job Class</th>
8
+ <th>Queue</th>
9
+ <th>Scheduled At</th>
10
+ <th>Error</th>
11
+ <th>ActiveJob Params</th>
12
+ </thead>
13
+ <tbody>
14
+ <% jobs.each do |job| %>
15
+ <tr id="<%= dom_id(job) %>">
16
+ <td><%= link_to job.id, active_job_path(job.serialized_params['job_id'], anchor: dom_id(job)) %></td>
17
+ <td><%= link_to job.serialized_params['job_id'], active_job_path(job.serialized_params['job_id']) %></td>
18
+ <td><%= job.serialized_params['job_class'] %></td>
19
+ <td><%= job.queue_name %></td>
20
+ <td><%= job.scheduled_at || job.created_at %></td>
21
+ <td><%= job.error %></td>
22
+ <td><pre><%= JSON.pretty_generate(job.serialized_params) %></pre></td>
23
+ </tr>
24
+ <% end %>
25
+ </tbody>
26
+ </table>
27
+ </div>
26
28
  </div>