good_job 1.3.5 → 1.6.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: 46b04fbfe44919834c406101ee18f2b53f5cc05e076525f7243e346fa966ca94
4
- data.tar.gz: 798738a1f2b0c7f21457921c2c640cdc78151a09262dfa7d8a383e8778282b9d
3
+ metadata.gz: b8f0f56838ed9baa984ad7b70ece1c72009369149bb45522aa140298ff727d44
4
+ data.tar.gz: a076e6f1315911e9fcacc8be7be4e87d176f6a63fd4cf8e297b8985d928074cf
5
5
  SHA512:
6
- metadata.gz: 841c85e7b4d9fa28d1fcdbb7c6a48771438f24ae33a264a80afdff1c9730a3438b98aa5d82f54bd1d4c979b2dab64997fbf6d64036bc96fdac6c851f70e0f68f
7
- data.tar.gz: 9c2d11c56e3db986aa5bbecc85a317396a19ba1c838b97d32cd16f21b9cd29b6c154be817879d8c8a8925da645d298442c0ebc39aba3d5bba707ed01558b55c5
6
+ metadata.gz: 6eae147e6a6f22da09c87b246735d0844e09dbaaea2e9b2cc92664ad86efef95feb8572ddafa83964009572d5c55db5eefc9f589d63820fb77fc59ec8ac4f110
7
+ data.tar.gz: 3f884573f31e65c3d63c2b864a820b9e9dd5db2a71405f3514ffdd774458bb89c7b5a834878aba2a57b988cce02443fc2df8e986d09815f98784bdaa9de6b62f
@@ -1,9 +1,99 @@
1
1
  # Changelog
2
2
 
3
+ ## [v1.6.0](https://github.com/bensheldon/good_job/tree/v1.6.0) (2021-01-21)
4
+
5
+ [Full Changelog](https://github.com/bensheldon/good_job/compare/v1.5.0...v1.6.0)
6
+
7
+ **Implemented enhancements:**
8
+
9
+ - Running as a daemon [\#88](https://github.com/bensheldon/good_job/issues/88)
10
+ - Add daemonize option to CLI [\#202](https://github.com/bensheldon/good_job/pull/202) ([bensheldon](https://github.com/bensheldon))
11
+
12
+ **Closed issues:**
13
+
14
+ - Rails 6.1 & async - `queue\_parser': undefined method `first' for "\*":String \(NoMethodError\) [\#195](https://github.com/bensheldon/good_job/issues/195)
15
+
16
+ **Merged pull requests:**
17
+
18
+ - Add scripts directory for benchmarking and dev tasks [\#204](https://github.com/bensheldon/good_job/pull/204) ([bensheldon](https://github.com/bensheldon))
19
+ - Fix YARD attr\_ declarations for documentation [\#203](https://github.com/bensheldon/good_job/pull/203) ([bensheldon](https://github.com/bensheldon))
20
+ - Remove Appraisal gemfile locks [\#201](https://github.com/bensheldon/good_job/pull/201) ([bensheldon](https://github.com/bensheldon))
21
+
22
+ ## [v1.5.0](https://github.com/bensheldon/good_job/tree/v1.5.0) (2021-01-18)
23
+
24
+ [Full Changelog](https://github.com/bensheldon/good_job/compare/v1.4.1...v1.5.0)
25
+
26
+ **Implemented enhancements:**
27
+
28
+ - Create Web UI Dashboard [\#50](https://github.com/bensheldon/good_job/issues/50)
29
+
30
+ **Closed issues:**
31
+
32
+ - JRuby Support [\#160](https://github.com/bensheldon/good_job/issues/160)
33
+
34
+ **Merged pull requests:**
35
+
36
+ - Update bundler version to 2.2.5 [\#200](https://github.com/bensheldon/good_job/pull/200) ([bensheldon](https://github.com/bensheldon))
37
+ - 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))
38
+ - Update GH Test Matrix with minimum & latest JRuby version [\#197](https://github.com/bensheldon/good_job/pull/197) ([tedhexaflow](https://github.com/tedhexaflow))
39
+ - Fix JRuby version number [\#193](https://github.com/bensheldon/good_job/pull/193) ([tedhexaflow](https://github.com/tedhexaflow))
40
+
41
+ ## [v1.4.1](https://github.com/bensheldon/good_job/tree/v1.4.1) (2021-01-09)
42
+
43
+ [Full Changelog](https://github.com/bensheldon/good_job/compare/v1.4.0...v1.4.1)
44
+
45
+ **Fixed bugs:**
46
+
47
+ - Do not add lib/generators to Zeitwerk autoloader [\#192](https://github.com/bensheldon/good_job/pull/192) ([bensheldon](https://github.com/bensheldon))
48
+
49
+ **Closed issues:**
50
+
51
+ - Issues with Heroku and Good Job [\#184](https://github.com/bensheldon/good_job/issues/184)
52
+
53
+ **Merged pull requests:**
54
+
55
+ - Add missing YARD docs and Dashboard screenshot [\#191](https://github.com/bensheldon/good_job/pull/191) ([bensheldon](https://github.com/bensheldon))
56
+
57
+ ## [v1.4.0](https://github.com/bensheldon/good_job/tree/v1.4.0) (2020-12-31)
58
+
59
+ [Full Changelog](https://github.com/bensheldon/good_job/compare/v1.3.6...v1.4.0)
60
+
61
+ **Implemented enhancements:**
62
+
63
+ - Add JRuby support [\#167](https://github.com/bensheldon/good_job/pull/167) ([bensheldon](https://github.com/bensheldon))
64
+
65
+ ## [v1.3.6](https://github.com/bensheldon/good_job/tree/v1.3.6) (2020-12-30)
66
+
67
+ [Full Changelog](https://github.com/bensheldon/good_job/compare/v1.3.5...v1.3.6)
68
+
69
+ **Implemented enhancements:**
70
+
71
+ - Call GoodJob.on\_thread\_error when Notifier thread raises exception [\#185](https://github.com/bensheldon/good_job/pull/185) ([bensheldon](https://github.com/bensheldon))
72
+ - Improve dashboard UI, fix button state, add unfiltering [\#181](https://github.com/bensheldon/good_job/pull/181) ([bensheldon](https://github.com/bensheldon))
73
+
74
+ **Fixed bugs:**
75
+
76
+ - Replace ActiveRecord execute usage and avoid potential memory leakage [\#187](https://github.com/bensheldon/good_job/issues/187)
77
+ - Does good\_job hold on to advisory locks for finished jobs? [\#177](https://github.com/bensheldon/good_job/issues/177)
78
+
79
+ **Merged pull requests:**
80
+
81
+ - Run tests with Rails default configuration to enable Zeitwerk [\#190](https://github.com/bensheldon/good_job/pull/190) ([bensheldon](https://github.com/bensheldon))
82
+ - 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))
83
+ - Have Lockable\#advisory\_locked? directly query pg\_locks table [\#188](https://github.com/bensheldon/good_job/pull/188) ([bensheldon](https://github.com/bensheldon))
84
+ - Update development gems, including Rails v6.1 and Rails HEAD [\#186](https://github.com/bensheldon/good_job/pull/186) ([bensheldon](https://github.com/bensheldon))
85
+ - Update Appraisals for Rails 6.1 [\#183](https://github.com/bensheldon/good_job/pull/183) ([bensheldon](https://github.com/bensheldon))
86
+ - Add Ruby 3 to CI test matrix [\#182](https://github.com/bensheldon/good_job/pull/182) ([bensheldon](https://github.com/bensheldon))
87
+
3
88
  ## [v1.3.5](https://github.com/bensheldon/good_job/tree/v1.3.5) (2020-12-17)
4
89
 
5
90
  [Full Changelog](https://github.com/bensheldon/good_job/compare/v1.3.4...v1.3.5)
6
91
 
92
+ **Fixed bugs:**
93
+
94
+ - Ensure advisory lock CTE is MATERIALIZED on Postgres v12+ [\#179](https://github.com/bensheldon/good_job/pull/179) ([bensheldon](https://github.com/bensheldon))
95
+ - Ensure that deleted jobs are unlocked [\#178](https://github.com/bensheldon/good_job/pull/178) ([bensheldon](https://github.com/bensheldon))
96
+
7
97
  **Closed issues:**
8
98
 
9
99
  - not running jobs [\#168](https://github.com/bensheldon/good_job/issues/168)
@@ -11,15 +101,13 @@
11
101
 
12
102
  **Merged pull requests:**
13
103
 
14
- - Ensure advisory lock CTE is MATERIALIZED on Postgres v12+ [\#179](https://github.com/bensheldon/good_job/pull/179) ([bensheldon](https://github.com/bensheldon))
15
- - Ensure that deleted jobs are unlocked [\#178](https://github.com/bensheldon/good_job/pull/178) ([bensheldon](https://github.com/bensheldon))
16
104
  - Add Appraisal for Rails 6.1-rc2 [\#175](https://github.com/bensheldon/good_job/pull/175) ([bensheldon](https://github.com/bensheldon))
17
105
 
18
106
  ## [v1.3.4](https://github.com/bensheldon/good_job/tree/v1.3.4) (2020-12-02)
19
107
 
20
108
  [Full Changelog](https://github.com/bensheldon/good_job/compare/v1.3.3...v1.3.4)
21
109
 
22
- **Merged pull requests:**
110
+ **Fixed bugs:**
23
111
 
24
112
  - Fix job ordering for Rails 6.1 [\#174](https://github.com/bensheldon/good_job/pull/174) ([morgoth](https://github.com/morgoth))
25
113
 
@@ -27,7 +115,7 @@
27
115
 
28
116
  [Full Changelog](https://github.com/bensheldon/good_job/compare/v1.3.2...v1.3.3)
29
117
 
30
- **Merged pull requests:**
118
+ **Implemented enhancements:**
31
119
 
32
120
  - UI: Admin UI with filters and space efficient layout [\#173](https://github.com/bensheldon/good_job/pull/173) ([zealot128](https://github.com/zealot128))
33
121
 
@@ -74,9 +162,6 @@
74
162
  **Implemented enhancements:**
75
163
 
76
164
  - Lengthen default poll interval from 1 to 5 seconds [\#156](https://github.com/bensheldon/good_job/pull/156) ([bensheldon](https://github.com/bensheldon))
77
-
78
- **Merged pull requests:**
79
-
80
165
  - 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))
81
166
 
82
167
  ## [v1.2.6](https://github.com/bensheldon/good_job/tree/v1.2.6) (2020-09-29)
@@ -186,11 +271,13 @@
186
271
  **Implemented enhancements:**
187
272
 
188
273
  - Run Github Action tests against Ruby 2.5, 2.6, 2.7 [\#100](https://github.com/bensheldon/good_job/issues/100)
274
+ - Name the thread pools [\#96](https://github.com/bensheldon/good_job/pull/96) ([sj26](https://github.com/sj26))
189
275
 
190
276
  **Fixed bugs:**
191
277
 
192
278
  - Freezes puma on code change [\#95](https://github.com/bensheldon/good_job/issues/95)
193
279
  - Ruby 2.7 keyword arguments warning [\#93](https://github.com/bensheldon/good_job/issues/93)
280
+ - Return to using executor.wrap around Scheduler execution task [\#99](https://github.com/bensheldon/good_job/pull/99) ([bensheldon](https://github.com/bensheldon))
194
281
 
195
282
  **Closed issues:**
196
283
 
@@ -200,10 +287,8 @@
200
287
 
201
288
  - Use more ActiveRecord in Lockable and not connection.execute [\#102](https://github.com/bensheldon/good_job/pull/102) ([bensheldon](https://github.com/bensheldon))
202
289
  - 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))
203
- - Return to using executor.wrap around Scheduler execution task [\#99](https://github.com/bensheldon/good_job/pull/99) ([bensheldon](https://github.com/bensheldon))
204
290
  - Fix Ruby 2.7 keyword arguments warning [\#98](https://github.com/bensheldon/good_job/pull/98) ([arku](https://github.com/arku))
205
291
  - Remove executor/reloader for less interlocking [\#97](https://github.com/bensheldon/good_job/pull/97) ([sj26](https://github.com/sj26))
206
- - Name the thread pools [\#96](https://github.com/bensheldon/good_job/pull/96) ([sj26](https://github.com/sj26))
207
292
  - Add test for `rails g good\_job:install` [\#94](https://github.com/bensheldon/good_job/pull/94) ([arku](https://github.com/arku))
208
293
 
209
294
  ## [v1.2.1](https://github.com/bensheldon/good_job/tree/v1.2.1) (2020-08-21)
@@ -428,6 +513,7 @@
428
513
  **Merged pull requests:**
429
514
 
430
515
  - Improve ActiveRecord usage for advisory locking [\#24](https://github.com/bensheldon/good_job/pull/24) ([bensheldon](https://github.com/bensheldon))
516
+ - Remove support for Rails 5.1 [\#23](https://github.com/bensheldon/good_job/pull/23) ([bensheldon](https://github.com/bensheldon))
431
517
 
432
518
  ## [v0.3.0](https://github.com/bensheldon/good_job/tree/v0.3.0) (2020-03-22)
433
519
 
@@ -446,7 +532,6 @@
446
532
 
447
533
  **Merged pull requests:**
448
534
 
449
- - Remove support for Rails 5.1 [\#23](https://github.com/bensheldon/good_job/pull/23) ([bensheldon](https://github.com/bensheldon))
450
535
  - Gracefully shutdown Scheduler when executable receives TERM or INT [\#17](https://github.com/bensheldon/good_job/pull/17) ([bensheldon](https://github.com/bensheldon))
451
536
  - Update Appraisals [\#16](https://github.com/bensheldon/good_job/pull/16) ([bensheldon](https://github.com/bensheldon))
452
537
 
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
@@ -145,6 +152,8 @@ Options:
145
152
  [--max-threads=COUNT] # Maximum number of threads to use for working jobs. (env var: GOOD_JOB_MAX_THREADS, default: 5)
146
153
  [--queues=QUEUE_LIST] # Queues to work from. (env var: GOOD_JOB_QUEUES, default: *)
147
154
  [--poll-interval=SECONDS] # Interval between polls for available jobs in seconds (env var: GOOD_JOB_POLL_INTERVAL, default: 1)
155
+ [--daemonize] # Run as a background daemon (default: false)
156
+ [--pidfile=PIDFILE] # Path to write daemonized Process ID (env var: GOOD_JOB_PIDFILE, default: tmp/pids/good_job.pid)
148
157
 
149
158
  Executes queued jobs.
150
159
 
@@ -152,6 +161,7 @@ All options can be configured with environment variables.
152
161
  See option descriptions for the matching environment variable name.
153
162
 
154
163
  == Configuring queues
164
+
155
165
  Separate multiple queues with commas; exclude queues with a leading minus;
156
166
  separate isolated execution pools with semicolons and threads with colons.
157
167
  ```
@@ -182,9 +192,31 @@ If you are preserving job records this way, use this command regularly
182
192
  to delete old records and preserve space in your database.
183
193
  ```
184
194
 
185
- ### Adapter options
195
+ ### Configuration options
196
+
197
+ To use GoodJob, you can set `config.active_job.queue_adapter` to a `:good_job`.
198
+
199
+ Additional configuration can be provided via `config.good_job.OPTION = ...` for example:
200
+
201
+ ```ruby
202
+ # config/application.rb
203
+
204
+ config.active_job.queue_adapter = :good_job
186
205
 
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:
206
+ # Configure options individually...
207
+ config.good_job.execution_mode = :async
208
+ config.good_job.max_threads = 5
209
+ config.good_job.poll_interval = 30 # seconds
210
+
211
+ # ...or all at once.
212
+ config.good_job = {
213
+ execution_mode: :async,
214
+ max_threads: 5,
215
+ poll_interval: 30,
216
+ }
217
+ ```
218
+
219
+ Available configuration options are:
188
220
 
189
221
  - `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
222
  - `: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 +226,21 @@ To use GoodJob, you can set `config.active_job.queue_adapter` to a `:good_job` o
194
226
  - `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
227
  - `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
228
 
197
- Using the symbol instead of explicitly configuring the options above (i.e. setting `config.active_job.queue_adapter = :good_job`) is equivalent to:
229
+ By default, GoodJob configures the following execution modes per environment:
198
230
 
199
231
  ```ruby
232
+
200
233
  # config/environments/development.rb
201
- config.active_job.queue_adapter = GoodJob::Adapter.new(execution_mode: :inline)
234
+ config.active_job.queue_adapter = :good_job
235
+ config.good_job.execution_mode = :inline
202
236
 
203
237
  # config/environments/test.rb
204
- config.active_job.queue_adapter = GoodJob::Adapter.new(execution_mode: :inline)
238
+ config.active_job.queue_adapter = :good_job
239
+ config.good_job.execution_mode = :inline
205
240
 
206
241
  # config/environments/production.rb
207
- config.active_job.queue_adapter = GoodJob::Adapter.new(execution_mode: :external)
242
+ config.active_job.queue_adapter = :good_job
243
+ config.good_job.execution_mode = :external
208
244
  ```
209
245
 
210
246
  ### Global options
@@ -227,6 +263,8 @@ GoodJob.on_thread_error = -> (exception) { Raven.capture_exception(exception) }
227
263
 
228
264
  ### Dashboard
229
265
 
266
+ ![Dashboard UI](https://github.com/bensheldon/good_job/raw/main/SCREENSHOT.png)
267
+
230
268
  _🚧 GoodJob's dashboard is a work in progress. Please contribute ideas and code on [Github](https://github.com/bensheldon/good_job/issues)._
231
269
 
232
270
  GoodJob includes a Dashboard as a mountable `Rails::Engine`.
@@ -433,14 +471,24 @@ pool: <%= [ENV.fetch("RAILS_MAX_THREADS", 5).to_i, ENV.fetch("GOOD_JOB_MAX_THREA
433
471
 
434
472
  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
473
 
436
- - Directly configure the ActiveJob adapter:
474
+ - Via Rails configuration:
437
475
 
438
476
  ```ruby
439
477
  # config/environments/production.rb
440
- config.active_job.queue_adapter = GoodJob::Adapter.new(execution_mode: :async, max_threads: 4, poll_interval: 30)
478
+ config.active_job.queue_adapter = :good_job
479
+
480
+ # To change the execution mode
481
+ config.good_job.execution_mode = :async
482
+
483
+ # Or with more configuration
484
+ config.good_job = {
485
+ execution_mode: :async,
486
+ max_threads: 4,
487
+ poll_interval: 30
488
+ }
441
489
  ```
442
490
 
443
- - Or, when using `...queue_adapter = :good_job`, via environment variables:
491
+ - Or, with environment variables:
444
492
 
445
493
  ```bash
446
494
  $ 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 %>
@@ -6,14 +6,14 @@
6
6
  <%= csp_meta_tag %>
7
7
 
8
8
  <style>
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") %>
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 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") %>
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>