good_job 2.4.2 → 2.6.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +79 -0
- data/README.md +12 -4
- data/engine/app/assets/scripts.js +1 -0
- data/engine/app/assets/style.css +5 -0
- data/engine/app/assets/vendor/chartjs/chart.min.js +13 -0
- data/engine/app/assets/vendor/rails_ujs.js +747 -0
- data/engine/app/charts/good_job/scheduled_by_queue_chart.rb +69 -0
- data/engine/app/controllers/good_job/assets_controller.rb +8 -4
- data/engine/app/controllers/good_job/cron_entries_controller.rb +19 -0
- data/engine/app/controllers/good_job/jobs_controller.rb +36 -0
- data/engine/app/filters/good_job/base_filter.rb +18 -56
- data/engine/app/filters/good_job/executions_filter.rb +9 -8
- data/engine/app/filters/good_job/jobs_filter.rb +12 -9
- data/engine/app/views/good_job/cron_entries/index.html.erb +51 -0
- data/engine/app/views/good_job/cron_entries/show.html.erb +4 -0
- data/engine/app/views/good_job/{shared/_executions_table.erb → executions/_table.erb} +1 -1
- data/engine/app/views/good_job/executions/index.html.erb +2 -2
- data/engine/app/views/good_job/{shared/_jobs_table.erb → jobs/_table.erb} +18 -6
- data/engine/app/views/good_job/jobs/index.html.erb +15 -2
- data/engine/app/views/good_job/jobs/show.html.erb +2 -2
- data/engine/app/views/good_job/shared/_chart.erb +19 -46
- data/engine/app/views/good_job/shared/_filter.erb +27 -13
- data/engine/app/views/good_job/shared/icons/_arrow_clockwise.html.erb +5 -0
- data/engine/app/views/good_job/shared/icons/_play.html.erb +4 -0
- data/engine/app/views/good_job/shared/icons/_skip_forward.html.erb +4 -0
- data/engine/app/views/good_job/shared/icons/_stop.html.erb +4 -0
- data/engine/app/views/layouts/good_job/base.html.erb +6 -4
- data/engine/config/routes.rb +17 -4
- data/lib/generators/good_job/templates/install/migrations/create_good_jobs.rb.erb +2 -0
- data/lib/generators/good_job/templates/update/migrations/02_add_cron_at_to_good_jobs.rb.erb +14 -0
- data/lib/generators/good_job/templates/update/migrations/03_add_cron_key_cron_at_index_to_good_jobs.rb.erb +20 -0
- data/lib/good_job/active_job_job.rb +228 -0
- data/lib/good_job/configuration.rb +1 -1
- data/lib/good_job/cron_entry.rb +78 -5
- data/lib/good_job/cron_manager.rb +4 -6
- data/lib/good_job/current_thread.rb +38 -5
- data/lib/good_job/execution.rb +53 -39
- data/lib/good_job/filterable.rb +42 -0
- data/lib/good_job/notifier.rb +17 -7
- data/lib/good_job/version.rb +1 -1
- metadata +31 -21
- data/engine/app/assets/vendor/chartist/chartist.css +0 -613
- data/engine/app/assets/vendor/chartist/chartist.js +0 -4516
- data/engine/app/controllers/good_job/cron_schedules_controller.rb +0 -9
- data/engine/app/models/good_job/active_job_job.rb +0 -127
- data/engine/app/views/good_job/cron_schedules/index.html.erb +0 -72
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6815620f600cf3f925daf7a5f13074f79ee26d7ab16b28b28c3be9e1ac2b9ac9
|
4
|
+
data.tar.gz: b7befdf977e9bebe94ac2707bea503c9e60e112045838885ee398a319026af9c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ba25873794f78d9e7081a0ae387d4e2c8cf6de96eaa28859e7fe565d85261de57538680f00d172f6eadcb91c157c1d2f34d66df2a630e94440b55fdd1f8ded05
|
7
|
+
data.tar.gz: 76a0d3cd4b76758f72a81f99a04aff2ea50396828b7fa4c440a3d401c01fc4accfb9d821f333b3ff71d517be565f9f9376ad27da5742611ff1744bc70c7d2f16
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,84 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## [v2.6.2](https://github.com/bensheldon/good_job/tree/v2.6.2) (2021-11-05)
|
4
|
+
|
5
|
+
[Full Changelog](https://github.com/bensheldon/good_job/compare/v2.6.1...v2.6.2)
|
6
|
+
|
7
|
+
**Fixed bugs:**
|
8
|
+
|
9
|
+
- Rename Filterable\#search to Filterable\#search\_text to avoid name collision [\#451](https://github.com/bensheldon/good_job/pull/451) ([bensheldon](https://github.com/bensheldon))
|
10
|
+
|
11
|
+
**Closed issues:**
|
12
|
+
|
13
|
+
- v2.6.1 is incompatible with gem thinking-sphinx [\#450](https://github.com/bensheldon/good_job/issues/450)
|
14
|
+
|
15
|
+
## [v2.6.1](https://github.com/bensheldon/good_job/tree/v2.6.1) (2021-11-05)
|
16
|
+
|
17
|
+
[Full Changelog](https://github.com/bensheldon/good_job/compare/v2.6.0...v2.6.1)
|
18
|
+
|
19
|
+
**Implemented enhancements:**
|
20
|
+
|
21
|
+
- Allow job management \(retry, destroy\) through the Web UI [\#256](https://github.com/bensheldon/good_job/issues/256)
|
22
|
+
- Add fulltext search filter [\#440](https://github.com/bensheldon/good_job/pull/440) ([bensheldon](https://github.com/bensheldon))
|
23
|
+
|
24
|
+
**Fixed bugs:**
|
25
|
+
|
26
|
+
- Unsubscribed LISTEN forever after database connection lost [\#303](https://github.com/bensheldon/good_job/issues/303)
|
27
|
+
- Add `PG::UnableToSend` and `PG::Error` as a Notifier connection error [\#445](https://github.com/bensheldon/good_job/pull/445) ([bensheldon](https://github.com/bensheldon))
|
28
|
+
|
29
|
+
**Closed issues:**
|
30
|
+
|
31
|
+
- Question: what's the correct way to handle database connection pool size when using cron [\#443](https://github.com/bensheldon/good_job/issues/443)
|
32
|
+
- Add a search bar to Dashboard [\#432](https://github.com/bensheldon/good_job/issues/432)
|
33
|
+
- Hacktoberfest 2021 [\#393](https://github.com/bensheldon/good_job/issues/393)
|
34
|
+
- Ideas for improvements to Cron [\#392](https://github.com/bensheldon/good_job/issues/392)
|
35
|
+
- Fix flakey test that times out [\#382](https://github.com/bensheldon/good_job/issues/382)
|
36
|
+
|
37
|
+
**Merged pull requests:**
|
38
|
+
|
39
|
+
- Update development dependencies [\#447](https://github.com/bensheldon/good_job/pull/447) ([bensheldon](https://github.com/bensheldon))
|
40
|
+
- Replace Chartist.js with Chart.js [\#444](https://github.com/bensheldon/good_job/pull/444) ([bensheldon](https://github.com/bensheldon))
|
41
|
+
- Fix JRuby flake: "Scheduler\#create\_thread returns false if there are no threads available" [\#442](https://github.com/bensheldon/good_job/pull/442) ([bensheldon](https://github.com/bensheldon))
|
42
|
+
|
43
|
+
## [v2.6.0](https://github.com/bensheldon/good_job/tree/v2.6.0) (2021-10-30)
|
44
|
+
|
45
|
+
[Full Changelog](https://github.com/bensheldon/good_job/compare/v2.5.0...v2.6.0)
|
46
|
+
|
47
|
+
**Implemented enhancements:**
|
48
|
+
|
49
|
+
- Allow for cron schedules to be expressed using fugit natural language parsing [\#441](https://github.com/bensheldon/good_job/pull/441) ([jgrau](https://github.com/jgrau))
|
50
|
+
- Add Rails UJS javascript to Dashboard along with confirmations [\#437](https://github.com/bensheldon/good_job/pull/437) ([bensheldon](https://github.com/bensheldon))
|
51
|
+
- Reorganize Cron dashboard screen; add jobs drill-drown and enqueue-now action [\#436](https://github.com/bensheldon/good_job/pull/436) ([bensheldon](https://github.com/bensheldon))
|
52
|
+
|
53
|
+
**Closed issues:**
|
54
|
+
|
55
|
+
- Ability to express cron schedule using fugit natural language parser [\#439](https://github.com/bensheldon/good_job/issues/439)
|
56
|
+
- Best way to ensure ordering of a queue. [\#402](https://github.com/bensheldon/good_job/issues/402)
|
57
|
+
- ActiveJob concurrency raises FrozenError [\#386](https://github.com/bensheldon/good_job/issues/386)
|
58
|
+
|
59
|
+
## [v2.5.0](https://github.com/bensheldon/good_job/tree/v2.5.0) (2021-10-25)
|
60
|
+
|
61
|
+
[Full Changelog](https://github.com/bensheldon/good_job/compare/v2.4.2...v2.5.0)
|
62
|
+
|
63
|
+
**Implemented enhancements:**
|
64
|
+
|
65
|
+
- Add Reschedule, Discard, Retry Job buttons to Dashboard [\#425](https://github.com/bensheldon/good_job/pull/425) ([bensheldon](https://github.com/bensheldon))
|
66
|
+
- Use unique index on \[cron\_key, cron\_at\] columns to prevent duplicate cron jobs from being enqueued [\#423](https://github.com/bensheldon/good_job/pull/423) ([bensheldon](https://github.com/bensheldon))
|
67
|
+
|
68
|
+
**Fixed bugs:**
|
69
|
+
|
70
|
+
- Dashboard fix preservation of `limit` and `queue_name` filter params; add pager to jobs [\#434](https://github.com/bensheldon/good_job/pull/434) ([bensheldon](https://github.com/bensheldon))
|
71
|
+
|
72
|
+
**Closed issues:**
|
73
|
+
|
74
|
+
- PgLock state inspection is not isolated to current database [\#431](https://github.com/bensheldon/good_job/issues/431)
|
75
|
+
- Race condition with concurency control [\#378](https://github.com/bensheldon/good_job/issues/378)
|
76
|
+
|
77
|
+
**Merged pull requests:**
|
78
|
+
|
79
|
+
- Add Readme note about race conditions in Concurrency's `enqueue\_limit` and `perform\_limit [\#433](https://github.com/bensheldon/good_job/pull/433) ([bensheldon](https://github.com/bensheldon))
|
80
|
+
- Test harness should only force-unlock db connections for the current database [\#430](https://github.com/bensheldon/good_job/pull/430) ([bensheldon](https://github.com/bensheldon))
|
81
|
+
|
3
82
|
## [v2.4.2](https://github.com/bensheldon/good_job/tree/v2.4.2) (2021-10-19)
|
4
83
|
|
5
84
|
[Full Changelog](https://github.com/bensheldon/good_job/compare/v2.4.1...v2.4.2)
|
data/README.md
CHANGED
@@ -363,11 +363,19 @@ class MyJob < ApplicationJob
|
|
363
363
|
total_limit: 1,
|
364
364
|
|
365
365
|
# Or, if more control is needed:
|
366
|
-
# Maximum number of jobs with the concurrency key to be
|
366
|
+
# Maximum number of jobs with the concurrency key to be
|
367
|
+
# concurrently enqueued (excludes performing jobs)
|
367
368
|
enqueue_limit: 2,
|
368
|
-
|
369
|
+
|
370
|
+
# Maximum number of jobs with the concurrency key to be
|
371
|
+
# concurrently performed (excludes enqueued jobs)
|
369
372
|
perform_limit: 1,
|
370
373
|
|
374
|
+
# Note: Under heavy load, the total number of jobs may exceed the
|
375
|
+
# sum of `enqueue_limit` and `perform_limit` because of race conditions
|
376
|
+
# caused by imperfectly disjunctive states. If you need to constrain
|
377
|
+
# the total number of jobs, use `total_limit` instead. See #378.
|
378
|
+
|
371
379
|
# A unique key to be globally locked against.
|
372
380
|
# Can be String or Lambda/Proc that is invoked in the context of the job.
|
373
381
|
# Note: Arguments passed to #perform_later must be accessed through `arguments` method.
|
@@ -391,9 +399,9 @@ job.good_job_concurrency_key #=> "Unique-Alice"
|
|
391
399
|
|
392
400
|
GoodJob can enqueue jobs on a recurring basis that can be used as a replacement for cron.
|
393
401
|
|
394
|
-
Cron-style jobs are run on every GoodJob process (e.g. CLI or `async` execution mode) when `config.good_job.enable_cron = true
|
402
|
+
Cron-style jobs are run on every GoodJob process (e.g. CLI or `async` execution mode) when `config.good_job.enable_cron = true`, but GoodJob's cron uses unique indexes to ensure that only a single job is enqeued at the given time interval.
|
395
403
|
|
396
|
-
Cron-format is parsed by the [`fugit`](https://github.com/floraison/fugit) gem, which has support for seconds-level resolution (e.g. `* * * * * *`).
|
404
|
+
Cron-format is parsed by the [`fugit`](https://github.com/floraison/fugit) gem, which has support for seconds-level resolution (e.g. `* * * * * *`) and natural language parsing (e.g. `every second`).
|
397
405
|
|
398
406
|
```ruby
|
399
407
|
# config/environments/application.rb or a specific environment e.g. production.rb
|
@@ -0,0 +1 @@
|
|
1
|
+
GoodJob = {};
|