good_job 2.16.1 → 2.17.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 +19 -5
- data/README.md +11 -15
- data/{engine/app → app}/assets/good_job/modules/application.js +0 -0
- data/{engine/app → app}/assets/good_job/modules/charts.js +0 -0
- data/{engine/app → app}/assets/good_job/modules/checkbox_toggle.js +0 -0
- data/{engine/app → app}/assets/good_job/modules/document_ready.js +0 -0
- data/{engine/app → app}/assets/good_job/modules/live_poll.js +0 -0
- data/{engine/app → app}/assets/good_job/modules/toasts.js +0 -0
- data/{engine/app → app}/assets/good_job/scripts.js +0 -0
- data/{engine/app → app}/assets/good_job/style.css +0 -0
- data/{engine/app → app}/assets/good_job/vendor/bootstrap/bootstrap.bundle.min.js +0 -0
- data/{engine/app → app}/assets/good_job/vendor/bootstrap/bootstrap.min.css +0 -0
- data/{engine/app → app}/assets/good_job/vendor/chartjs/chart.min.js +0 -0
- data/{engine/app → app}/assets/good_job/vendor/es_module_shims.js +0 -0
- data/{engine/app → app}/assets/good_job/vendor/rails_ujs.js +0 -0
- data/{engine/app → app}/charts/good_job/scheduled_by_queue_chart.rb +0 -0
- data/{engine/app → app}/controllers/good_job/application_controller.rb +0 -0
- data/{engine/app → app}/controllers/good_job/assets_controller.rb +0 -0
- data/{engine/app → app}/controllers/good_job/cron_entries_controller.rb +0 -0
- data/{engine/app → app}/controllers/good_job/jobs_controller.rb +0 -0
- data/{engine/app → app}/controllers/good_job/processes_controller.rb +0 -0
- data/{engine/app → app}/filters/good_job/base_filter.rb +0 -0
- data/{engine/app → app}/filters/good_job/jobs_filter.rb +0 -0
- data/{engine/app → app}/helpers/good_job/application_helper.rb +0 -0
- data/{lib → app/models}/good_job/active_job_job.rb +2 -2
- data/{lib → app/models}/good_job/execution.rb +0 -0
- data/{lib → app/models}/good_job/process.rb +0 -0
- data/{engine/app → app}/views/good_job/cron_entries/index.html.erb +0 -0
- data/{engine/app → app}/views/good_job/cron_entries/show.html.erb +0 -0
- data/{engine/app → app}/views/good_job/jobs/_executions.erb +0 -0
- data/{engine/app → app}/views/good_job/jobs/_table.erb +0 -0
- data/{engine/app → app}/views/good_job/jobs/index.html.erb +0 -0
- data/{engine/app → app}/views/good_job/jobs/show.html.erb +0 -0
- data/{engine/app → app}/views/good_job/processes/index.html.erb +0 -0
- data/{engine/app → app}/views/good_job/shared/_alert.erb +0 -0
- data/{engine/app → app}/views/good_job/shared/_chart.erb +0 -0
- data/{engine/app → app}/views/good_job/shared/_filter.erb +0 -0
- data/{engine/app → app}/views/good_job/shared/_footer.erb +0 -0
- data/{engine/app → app}/views/good_job/shared/_navbar.erb +0 -0
- data/{engine/app → app}/views/good_job/shared/icons/_arrow_clockwise.html.erb +0 -0
- data/{engine/app → app}/views/good_job/shared/icons/_check.html.erb +0 -0
- data/{engine/app → app}/views/good_job/shared/icons/_clock.html.erb +0 -0
- data/{engine/app → app}/views/good_job/shared/icons/_dash_circle.html.erb +0 -0
- data/{engine/app → app}/views/good_job/shared/icons/_exclamation.html.erb +0 -0
- data/{engine/app → app}/views/good_job/shared/icons/_play.html.erb +0 -0
- data/{engine/app → app}/views/good_job/shared/icons/_skip_forward.html.erb +0 -0
- data/{engine/app → app}/views/good_job/shared/icons/_stop.html.erb +0 -0
- data/{engine/app → app}/views/good_job/shared/icons/_trash.html.erb +0 -0
- data/{engine/app → app}/views/layouts/good_job/application.html.erb +0 -0
- data/{engine/config → config}/locales/en.yml +0 -0
- data/{engine/config → config}/locales/es.yml +0 -0
- data/{engine/config → config}/locales/nl.yml +0 -0
- data/{engine/config → config}/locales/ru.yml +0 -0
- data/{engine/config → config}/routes.rb +0 -0
- data/lib/good_job/{railtie.rb → engine.rb} +3 -1
- data/lib/good_job/version.rb +1 -1
- data/lib/good_job.rb +1 -2
- metadata +56 -58
- data/engine/lib/good_job/engine.rb +0 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 92c29f2bed6e36f449e880b5433c089351c63d1365cdc094b774122202407fb3
|
4
|
+
data.tar.gz: 4125a6cfb9e3c0d3de88bd8cdfb64acb450f8c6072fc2aa6a0907f9b51083add
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cd6b4fbce879de227852b9399bbb65739933b50732dfc5be5a3563162c55375d1d366d4796bf163c4d12683a7f03668ef7a80d73e229343debe622c7e7ccd2b1
|
7
|
+
data.tar.gz: 5f4fac41e04a0844b93cc482e24b910e599ccabf411ac6841e7519cb6d573a6d7bb82070f6a35ffc40a1937256f910e9e6995cc5a9090e779c9b2eac33a8d901
|
data/CHANGELOG.md
CHANGED
@@ -1,25 +1,39 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## [v2.17.0](https://github.com/bensheldon/good_job/tree/v2.17.0) (2022-06-23)
|
4
|
+
|
5
|
+
[Full Changelog](https://github.com/bensheldon/good_job/compare/v2.16.1...v2.17.0)
|
6
|
+
|
7
|
+
**Merged pull requests:**
|
8
|
+
|
9
|
+
- Remove nonexistant `engine/lib` from $LOAD\_PATH [\#629](https://github.com/bensheldon/good_job/pull/629) ([bensheldon](https://github.com/bensheldon))
|
10
|
+
- Mention in README that dashboard can't see completed jobs unless they are preserved [\#627](https://github.com/bensheldon/good_job/pull/627) ([jrochkind](https://github.com/jrochkind))
|
11
|
+
- Clarify README on default in development [\#623](https://github.com/bensheldon/good_job/pull/623) ([jrochkind](https://github.com/jrochkind))
|
12
|
+
- Convert GoodJob into a single mountable engine \(instead of a plugin plus optional engine\) [\#554](https://github.com/bensheldon/good_job/pull/554) ([bensheldon](https://github.com/bensheldon))
|
13
|
+
|
3
14
|
## [v2.16.1](https://github.com/bensheldon/good_job/tree/v2.16.1) (2022-06-18)
|
4
15
|
|
5
16
|
[Full Changelog](https://github.com/bensheldon/good_job/compare/v2.16.0...v2.16.1)
|
6
17
|
|
7
|
-
**
|
18
|
+
**Fixed bugs:**
|
8
19
|
|
9
20
|
- Fix `:inline` mode with future behavior to run unscheduled jobs immediately [\#620](https://github.com/bensheldon/good_job/pull/620) ([bensheldon](https://github.com/bensheldon))
|
21
|
+
|
22
|
+
**Merged pull requests:**
|
23
|
+
|
10
24
|
- Version check `Zeitwerk::Loader.new(warn_on_extra_files: false)` flag [\#619](https://github.com/bensheldon/good_job/pull/619) ([bensheldon](https://github.com/bensheldon))
|
11
25
|
|
12
26
|
## [v2.16.0](https://github.com/bensheldon/good_job/tree/v2.16.0) (2022-06-17)
|
13
27
|
|
14
28
|
[Full Changelog](https://github.com/bensheldon/good_job/compare/v2.15.2...v2.16.0)
|
15
29
|
|
16
|
-
**
|
30
|
+
**Implemented enhancements:**
|
17
31
|
|
18
|
-
-
|
32
|
+
- Allow inline executor to respect scheduled jobs; deprecate old behavior. Add `GoodJob.perform_inline` [\#615](https://github.com/bensheldon/good_job/pull/615) ([bensheldon](https://github.com/bensheldon))
|
19
33
|
|
20
|
-
**
|
34
|
+
**Closed issues:**
|
21
35
|
|
22
|
-
-
|
36
|
+
- Upgrading zeitwerk to 2.6.0 causes a warning related to good\_job [\#616](https://github.com/bensheldon/good_job/issues/616)
|
23
37
|
|
24
38
|
## [v2.15.2](https://github.com/bensheldon/good_job/tree/v2.15.2) (2022-06-17)
|
25
39
|
|
data/README.md
CHANGED
@@ -116,7 +116,7 @@ For more of the story of GoodJob, read the [introductory blog post](https://isla
|
|
116
116
|
YourJob.set(queue: :some_queue, wait: 5.minutes, priority: 10).perform_later
|
117
117
|
```
|
118
118
|
|
119
|
-
1. In development, GoodJob executes jobs immediately. In production, GoodJob provides different options:
|
119
|
+
1. In development, GoodJob executes jobs immediately in a separate thread (async mode). In production, GoodJob provides different options:
|
120
120
|
|
121
121
|
- By default, GoodJob separates job enqueuing from job execution so that jobs can be scaled independently of the web server. Use the GoodJob command-line tool to execute jobs:
|
122
122
|
|
@@ -332,19 +332,6 @@ _🚧 GoodJob's dashboard is a work in progress. Please contribute ideas and cod
|
|
332
332
|
|
333
333
|
GoodJob includes a Dashboard as a mountable `Rails::Engine`.
|
334
334
|
|
335
|
-
1. Explicitly require the Engine code at the top of your `config/application.rb` file, immediately after Rails is required and before Bundler requires the Rails' groups. This is necessary because the mountable engine is an optional feature of GoodJob.
|
336
|
-
|
337
|
-
```ruby
|
338
|
-
# config/application.rb
|
339
|
-
require_relative 'boot'
|
340
|
-
|
341
|
-
require 'rails/all'
|
342
|
-
require 'good_job/engine' # <= Add this line
|
343
|
-
# ...
|
344
|
-
```
|
345
|
-
|
346
|
-
Note: If you find the dashboard fails to reload due to a routing error and uninitialized constant `GoodJob::ExecutionsController`, this is likely because you are not requiring the engine early enough.
|
347
|
-
|
348
335
|
1. Mount the engine in your `config/routes.rb` file. The following will mount it at `http://example.com/good_job`.
|
349
336
|
|
350
337
|
```ruby
|
@@ -353,7 +340,7 @@ GoodJob includes a Dashboard as a mountable `Rails::Engine`.
|
|
353
340
|
mount GoodJob::Engine => 'good_job'
|
354
341
|
```
|
355
342
|
|
356
|
-
|
343
|
+
1. Configure authentication. Because jobs can potentially contain sensitive information, you should authorize access. For example, using Devise's `authenticate` helper, that might look like:
|
357
344
|
|
358
345
|
```ruby
|
359
346
|
# config/routes.rb
|
@@ -373,6 +360,15 @@ GoodJob includes a Dashboard as a mountable `Rails::Engine`.
|
|
373
360
|
end
|
374
361
|
```
|
375
362
|
|
363
|
+
1. If you want to see finished (successful) and discarded (failed) jobs on the dashboard, you will have to configure job records to be preserved:
|
364
|
+
|
365
|
+
```ruby
|
366
|
+
# eg in config/initializers/good_job.rb
|
367
|
+
GoodJob.preserve_job_records = true
|
368
|
+
```
|
369
|
+
|
370
|
+
See more at [Monitor and preserve worked jobs](#monitor-and-preserve-worked-jobs)
|
371
|
+
|
376
372
|
#### API-only Rails applications
|
377
373
|
|
378
374
|
API-only Rails applications may not have all of the required Rack middleware for the GoodJob Dashboard to function. To re-add the middlware:
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -16,7 +16,7 @@ module GoodJob
|
|
16
16
|
DiscardJobError = Class.new(StandardError)
|
17
17
|
|
18
18
|
class << self
|
19
|
-
delegate :table_name, to: Execution
|
19
|
+
delegate :table_name, to: GoodJob::Execution
|
20
20
|
|
21
21
|
def table_name=(_value)
|
22
22
|
raise NotImplementedError, 'Assign GoodJob::Execution.table_name directly'
|
@@ -26,7 +26,7 @@ module GoodJob
|
|
26
26
|
self.primary_key = 'active_job_id'
|
27
27
|
self.advisory_lockable_column = 'active_job_id'
|
28
28
|
|
29
|
-
has_many :executions, -> { order(created_at: :asc) }, class_name: 'GoodJob::Execution', foreign_key: 'active_job_id', inverse_of: :job
|
29
|
+
has_many :executions, -> { order(created_at: :asc) }, class_name: 'GoodJob::Execution', foreign_key: 'active_job_id', inverse_of: :job # rubocop:disable Rails/HasManyOrHasOneDependent
|
30
30
|
|
31
31
|
# Only the most-recent unretried execution represents a "Job"
|
32
32
|
default_scope { where(retried_good_job_id: nil) }
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/lib/good_job/version.rb
CHANGED
data/lib/good_job.rb
CHANGED
@@ -1,5 +1,4 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
-
require "rails"
|
3
2
|
require "active_job"
|
4
3
|
require "active_job/queue_adapters"
|
5
4
|
|
@@ -13,7 +12,7 @@ Zeitwerk::Loader.for_gem(**zeitwerk_options).tap do |loader|
|
|
13
12
|
loader.setup
|
14
13
|
end
|
15
14
|
|
16
|
-
require "good_job/
|
15
|
+
require "good_job/engine"
|
17
16
|
|
18
17
|
# GoodJob is a multithreaded, Postgres-based, ActiveJob backend for Ruby on Rails.
|
19
18
|
#
|
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.17.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: 2022-06-
|
11
|
+
date: 2022-06-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activejob
|
@@ -360,56 +360,58 @@ files:
|
|
360
360
|
- CHANGELOG.md
|
361
361
|
- LICENSE.txt
|
362
362
|
- README.md
|
363
|
-
-
|
364
|
-
-
|
365
|
-
-
|
366
|
-
-
|
367
|
-
-
|
368
|
-
-
|
369
|
-
-
|
370
|
-
-
|
371
|
-
-
|
372
|
-
-
|
373
|
-
-
|
374
|
-
-
|
375
|
-
-
|
376
|
-
-
|
377
|
-
-
|
378
|
-
-
|
379
|
-
-
|
380
|
-
-
|
381
|
-
-
|
382
|
-
-
|
383
|
-
-
|
384
|
-
-
|
385
|
-
-
|
386
|
-
-
|
387
|
-
-
|
388
|
-
-
|
389
|
-
-
|
390
|
-
-
|
391
|
-
-
|
392
|
-
-
|
393
|
-
-
|
394
|
-
-
|
395
|
-
-
|
396
|
-
-
|
397
|
-
-
|
398
|
-
-
|
399
|
-
-
|
400
|
-
-
|
401
|
-
-
|
402
|
-
-
|
403
|
-
-
|
404
|
-
-
|
405
|
-
-
|
406
|
-
-
|
407
|
-
-
|
408
|
-
-
|
409
|
-
-
|
410
|
-
-
|
411
|
-
-
|
412
|
-
-
|
363
|
+
- app/assets/good_job/modules/application.js
|
364
|
+
- app/assets/good_job/modules/charts.js
|
365
|
+
- app/assets/good_job/modules/checkbox_toggle.js
|
366
|
+
- app/assets/good_job/modules/document_ready.js
|
367
|
+
- app/assets/good_job/modules/live_poll.js
|
368
|
+
- app/assets/good_job/modules/toasts.js
|
369
|
+
- app/assets/good_job/scripts.js
|
370
|
+
- app/assets/good_job/style.css
|
371
|
+
- app/assets/good_job/vendor/bootstrap/bootstrap.bundle.min.js
|
372
|
+
- app/assets/good_job/vendor/bootstrap/bootstrap.min.css
|
373
|
+
- app/assets/good_job/vendor/chartjs/chart.min.js
|
374
|
+
- app/assets/good_job/vendor/es_module_shims.js
|
375
|
+
- app/assets/good_job/vendor/rails_ujs.js
|
376
|
+
- app/charts/good_job/scheduled_by_queue_chart.rb
|
377
|
+
- app/controllers/good_job/application_controller.rb
|
378
|
+
- app/controllers/good_job/assets_controller.rb
|
379
|
+
- app/controllers/good_job/cron_entries_controller.rb
|
380
|
+
- app/controllers/good_job/jobs_controller.rb
|
381
|
+
- app/controllers/good_job/processes_controller.rb
|
382
|
+
- app/filters/good_job/base_filter.rb
|
383
|
+
- app/filters/good_job/jobs_filter.rb
|
384
|
+
- app/helpers/good_job/application_helper.rb
|
385
|
+
- app/models/good_job/active_job_job.rb
|
386
|
+
- app/models/good_job/execution.rb
|
387
|
+
- app/models/good_job/process.rb
|
388
|
+
- app/views/good_job/cron_entries/index.html.erb
|
389
|
+
- app/views/good_job/cron_entries/show.html.erb
|
390
|
+
- app/views/good_job/jobs/_executions.erb
|
391
|
+
- app/views/good_job/jobs/_table.erb
|
392
|
+
- app/views/good_job/jobs/index.html.erb
|
393
|
+
- app/views/good_job/jobs/show.html.erb
|
394
|
+
- app/views/good_job/processes/index.html.erb
|
395
|
+
- app/views/good_job/shared/_alert.erb
|
396
|
+
- app/views/good_job/shared/_chart.erb
|
397
|
+
- app/views/good_job/shared/_filter.erb
|
398
|
+
- app/views/good_job/shared/_footer.erb
|
399
|
+
- app/views/good_job/shared/_navbar.erb
|
400
|
+
- app/views/good_job/shared/icons/_arrow_clockwise.html.erb
|
401
|
+
- app/views/good_job/shared/icons/_check.html.erb
|
402
|
+
- app/views/good_job/shared/icons/_clock.html.erb
|
403
|
+
- app/views/good_job/shared/icons/_dash_circle.html.erb
|
404
|
+
- app/views/good_job/shared/icons/_exclamation.html.erb
|
405
|
+
- app/views/good_job/shared/icons/_play.html.erb
|
406
|
+
- app/views/good_job/shared/icons/_skip_forward.html.erb
|
407
|
+
- app/views/good_job/shared/icons/_stop.html.erb
|
408
|
+
- app/views/good_job/shared/icons/_trash.html.erb
|
409
|
+
- app/views/layouts/good_job/application.html.erb
|
410
|
+
- config/locales/en.yml
|
411
|
+
- config/locales/es.yml
|
412
|
+
- config/locales/nl.yml
|
413
|
+
- config/locales/ru.yml
|
414
|
+
- config/routes.rb
|
413
415
|
- exe/good_job
|
414
416
|
- lib/active_job/queue_adapters/good_job_adapter.rb
|
415
417
|
- lib/generators/good_job/install_generator.rb
|
@@ -423,7 +425,6 @@ files:
|
|
423
425
|
- lib/good_job.rb
|
424
426
|
- lib/good_job/active_job_extensions.rb
|
425
427
|
- lib/good_job/active_job_extensions/concurrency.rb
|
426
|
-
- lib/good_job/active_job_job.rb
|
427
428
|
- lib/good_job/adapter.rb
|
428
429
|
- lib/good_job/assignable_connection.rb
|
429
430
|
- lib/good_job/base_record.rb
|
@@ -435,7 +436,7 @@ files:
|
|
435
436
|
- lib/good_job/current_thread.rb
|
436
437
|
- lib/good_job/daemon.rb
|
437
438
|
- lib/good_job/dependencies.rb
|
438
|
-
- lib/good_job/
|
439
|
+
- lib/good_job/engine.rb
|
439
440
|
- lib/good_job/execution_result.rb
|
440
441
|
- lib/good_job/filterable.rb
|
441
442
|
- lib/good_job/job.rb
|
@@ -447,8 +448,6 @@ files:
|
|
447
448
|
- lib/good_job/notifier/process_registration.rb
|
448
449
|
- lib/good_job/poller.rb
|
449
450
|
- lib/good_job/probe_server.rb
|
450
|
-
- lib/good_job/process.rb
|
451
|
-
- lib/good_job/railtie.rb
|
452
451
|
- lib/good_job/scheduler.rb
|
453
452
|
- lib/good_job/version.rb
|
454
453
|
homepage: https://github.com/bensheldon/good_job
|
@@ -472,7 +471,6 @@ rdoc_options:
|
|
472
471
|
- "--quiet"
|
473
472
|
require_paths:
|
474
473
|
- lib
|
475
|
-
- engine/lib
|
476
474
|
required_ruby_version: !ruby/object:Gem::Requirement
|
477
475
|
requirements:
|
478
476
|
- - ">="
|
@@ -484,7 +482,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
484
482
|
- !ruby/object:Gem::Version
|
485
483
|
version: '0'
|
486
484
|
requirements: []
|
487
|
-
rubygems_version: 3.
|
485
|
+
rubygems_version: 3.3.16
|
488
486
|
signing_key:
|
489
487
|
specification_version: 4
|
490
488
|
summary: A multithreaded, Postgres-based ActiveJob backend for Ruby on Rails
|