good_job 2.6.0 → 2.7.1
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 +4 -4
- data/CHANGELOG.md +70 -0
- data/README.md +57 -0
- 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/charts/good_job/scheduled_by_queue_chart.rb +69 -0
- data/engine/app/controllers/good_job/assets_controller.rb +6 -6
- data/engine/app/controllers/good_job/base_controller.rb +19 -0
- data/engine/app/filters/good_job/base_filter.rb +7 -50
- data/engine/app/filters/good_job/executions_filter.rb +9 -8
- data/engine/app/filters/good_job/jobs_filter.rb +9 -8
- data/engine/app/views/good_job/executions/index.html.erb +1 -1
- data/engine/app/views/good_job/jobs/_table.erb +1 -1
- data/engine/app/views/good_job/jobs/index.html.erb +1 -1
- data/engine/app/views/good_job/shared/_chart.erb +19 -46
- data/engine/app/views/good_job/shared/_filter.erb +18 -3
- data/engine/app/views/layouts/good_job/base.html.erb +4 -3
- data/engine/config/routes.rb +2 -2
- data/lib/good_job/active_job_job.rb +2 -19
- data/lib/good_job/cli.rb +8 -0
- data/lib/good_job/configuration.rb +7 -0
- data/lib/good_job/execution.rb +1 -18
- data/lib/good_job/filterable.rb +42 -0
- data/lib/good_job/job_performer.rb +2 -5
- data/lib/good_job/lockable.rb +2 -4
- data/lib/good_job/notifier.rb +17 -7
- data/lib/good_job/probe_server.rb +51 -0
- data/lib/good_job/version.rb +1 -1
- metadata +29 -12
- data/engine/app/assets/vendor/chartist/chartist.css +0 -613
- data/engine/app/assets/vendor/chartist/chartist.js +0 -4516
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ad8ca019c816dee452b246cdaa6d806844bcbd6aca63da6e5d52c87828c9c8e4
|
4
|
+
data.tar.gz: 343c128a0d8477688e8f38d214add4c341dbfce694c19c6c2acf9cf7bb5c5cef
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d5153a01609aefefd4ac23319ba76755ba13ea64c749b9b582fda5a17a497c0d640e20e6db91aa9eb9b18042b62283acc8dd25c67f1389290291ae55c2187f33
|
7
|
+
data.tar.gz: e145b2a1d26eaf4b07e60ca8826e39216de230569f197f0eafae481b7716754aeb95a4bce54330e15389612f49361f320c8934965beca9c4c60d97f1a84f3b05
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,75 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## [v2.7.1](https://github.com/bensheldon/good_job/tree/v2.7.1) (2021-11-26)
|
4
|
+
|
5
|
+
[Full Changelog](https://github.com/bensheldon/good_job/compare/v2.7.0...v2.7.1)
|
6
|
+
|
7
|
+
**Fixed bugs:**
|
8
|
+
|
9
|
+
- Unclear error when database can't be reached [\#457](https://github.com/bensheldon/good_job/issues/457)
|
10
|
+
- Remove Concurrent::Delay wrapping of database-loading methods [\#458](https://github.com/bensheldon/good_job/pull/458) ([bensheldon](https://github.com/bensheldon))
|
11
|
+
- Do not delete csp policies when checking csp policies [\#456](https://github.com/bensheldon/good_job/pull/456) ([JonathanFrias](https://github.com/JonathanFrias))
|
12
|
+
|
13
|
+
**Closed issues:**
|
14
|
+
|
15
|
+
- How to suppress job scheduler logs? [\#455](https://github.com/bensheldon/good_job/issues/455)
|
16
|
+
- Configuration in environments/\*.rb overrides application.rb [\#453](https://github.com/bensheldon/good_job/issues/453)
|
17
|
+
- Testing jobs synchronously [\#435](https://github.com/bensheldon/good_job/issues/435)
|
18
|
+
- HTTP health check endpoint [\#403](https://github.com/bensheldon/good_job/issues/403)
|
19
|
+
|
20
|
+
## [v2.7.0](https://github.com/bensheldon/good_job/tree/v2.7.0) (2021-11-10)
|
21
|
+
|
22
|
+
[Full Changelog](https://github.com/bensheldon/good_job/compare/v2.6.2...v2.7.0)
|
23
|
+
|
24
|
+
**Implemented enhancements:**
|
25
|
+
|
26
|
+
- Add http probe for CLI healthcheck/readiness/liveliness [\#452](https://github.com/bensheldon/good_job/pull/452) ([bensheldon](https://github.com/bensheldon))
|
27
|
+
- Add explicit Content Security Policy \(CSP\) for Dashboard [\#449](https://github.com/bensheldon/good_job/pull/449) ([bensheldon](https://github.com/bensheldon))
|
28
|
+
|
29
|
+
**Closed issues:**
|
30
|
+
|
31
|
+
- Add a default Content-Security-Policy for the Dashboard [\#420](https://github.com/bensheldon/good_job/issues/420)
|
32
|
+
|
33
|
+
## [v2.6.2](https://github.com/bensheldon/good_job/tree/v2.6.2) (2021-11-05)
|
34
|
+
|
35
|
+
[Full Changelog](https://github.com/bensheldon/good_job/compare/v2.6.1...v2.6.2)
|
36
|
+
|
37
|
+
**Fixed bugs:**
|
38
|
+
|
39
|
+
- 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))
|
40
|
+
|
41
|
+
**Closed issues:**
|
42
|
+
|
43
|
+
- v2.6.1 is incompatible with gem thinking-sphinx [\#450](https://github.com/bensheldon/good_job/issues/450)
|
44
|
+
|
45
|
+
## [v2.6.1](https://github.com/bensheldon/good_job/tree/v2.6.1) (2021-11-05)
|
46
|
+
|
47
|
+
[Full Changelog](https://github.com/bensheldon/good_job/compare/v2.6.0...v2.6.1)
|
48
|
+
|
49
|
+
**Implemented enhancements:**
|
50
|
+
|
51
|
+
- Allow job management \(retry, destroy\) through the Web UI [\#256](https://github.com/bensheldon/good_job/issues/256)
|
52
|
+
- Add fulltext search filter [\#440](https://github.com/bensheldon/good_job/pull/440) ([bensheldon](https://github.com/bensheldon))
|
53
|
+
|
54
|
+
**Fixed bugs:**
|
55
|
+
|
56
|
+
- Unsubscribed LISTEN forever after database connection lost [\#303](https://github.com/bensheldon/good_job/issues/303)
|
57
|
+
- 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))
|
58
|
+
|
59
|
+
**Closed issues:**
|
60
|
+
|
61
|
+
- Question: what's the correct way to handle database connection pool size when using cron [\#443](https://github.com/bensheldon/good_job/issues/443)
|
62
|
+
- Add a search bar to Dashboard [\#432](https://github.com/bensheldon/good_job/issues/432)
|
63
|
+
- Hacktoberfest 2021 [\#393](https://github.com/bensheldon/good_job/issues/393)
|
64
|
+
- Ideas for improvements to Cron [\#392](https://github.com/bensheldon/good_job/issues/392)
|
65
|
+
- Fix flakey test that times out [\#382](https://github.com/bensheldon/good_job/issues/382)
|
66
|
+
|
67
|
+
**Merged pull requests:**
|
68
|
+
|
69
|
+
- Update development dependencies [\#447](https://github.com/bensheldon/good_job/pull/447) ([bensheldon](https://github.com/bensheldon))
|
70
|
+
- Replace Chartist.js with Chart.js [\#444](https://github.com/bensheldon/good_job/pull/444) ([bensheldon](https://github.com/bensheldon))
|
71
|
+
- 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))
|
72
|
+
|
3
73
|
## [v2.6.0](https://github.com/bensheldon/good_job/tree/v2.6.0) (2021-10-30)
|
4
74
|
|
5
75
|
[Full Changelog](https://github.com/bensheldon/good_job/compare/v2.5.0...v2.6.0)
|
data/README.md
CHANGED
@@ -55,6 +55,7 @@ For more of the story of GoodJob, read the [introductory blog post](https://isla
|
|
55
55
|
- [Migrate to GoodJob from a different ActiveJob backend](#migrate-to-goodjob-from-a-different-activejob-backend)
|
56
56
|
- [Monitor and preserve worked jobs](#monitor-and-preserve-worked-jobs)
|
57
57
|
- [PgBouncer compatibility](#pgbouncer-compatibility)
|
58
|
+
- [CLI HTTP health check probes](#cli-http-health-check-probes)
|
58
59
|
- [Contribute](#contribute)
|
59
60
|
- [Gem development](#gem-development)
|
60
61
|
- [Release](#release)
|
@@ -170,6 +171,7 @@ Options:
|
|
170
171
|
[--enable-cron] # Whether to run cron process (default: false)
|
171
172
|
[--daemonize] # Run as a background daemon (default: false)
|
172
173
|
[--pidfile=PIDFILE] # Path to write daemonized Process ID (env var: GOOD_JOB_PIDFILE, default: tmp/pids/good_job.pid)
|
174
|
+
[--probe-port=PORT] # Port for http health check (env var: GOOD_JOB_PROBE_PORT, default: nil)
|
173
175
|
|
174
176
|
Executes queued jobs.
|
175
177
|
|
@@ -837,6 +839,61 @@ A workaround to this limitation is to make a direct database connection availabl
|
|
837
839
|
GoodJob.active_record_parent_class = "ApplicationDirectRecord"
|
838
840
|
```
|
839
841
|
|
842
|
+
### CLI HTTP health check probes
|
843
|
+
|
844
|
+
GoodJob's CLI offers an http health check probe to better manage process lifecycle in containerized environments like Kubernetes:
|
845
|
+
|
846
|
+
```bash
|
847
|
+
# Run the CLI with a health check on port 7001
|
848
|
+
good_job start --probe-port=7001
|
849
|
+
|
850
|
+
# or via an environment variable
|
851
|
+
GOOD_JOB_PROBE_PORT=7001 good_job start
|
852
|
+
|
853
|
+
# Probe the status
|
854
|
+
curl localhost:7001/status
|
855
|
+
curl localhost:7001/status/started
|
856
|
+
curl localhost:7001/status/connected
|
857
|
+
```
|
858
|
+
|
859
|
+
Multiple health checks are available at different paths:
|
860
|
+
|
861
|
+
- `/` or `/status`: the CLI process is running
|
862
|
+
- `/status/started`: the multithreaded job executor is running
|
863
|
+
- `/status/connected`: the database connection is established
|
864
|
+
|
865
|
+
This can be configured, for example with Kubernetes:
|
866
|
+
|
867
|
+
```yaml
|
868
|
+
spec:
|
869
|
+
containers:
|
870
|
+
- name: good_job
|
871
|
+
image: my_app:latest
|
872
|
+
env:
|
873
|
+
- name: RAILS_ENV
|
874
|
+
value: production
|
875
|
+
- name: GOOD_JOB_PROBE_PORT
|
876
|
+
value: 7001
|
877
|
+
command:
|
878
|
+
- good_job
|
879
|
+
- start
|
880
|
+
ports:
|
881
|
+
- name: probe-port
|
882
|
+
containerPort: 7001
|
883
|
+
startupProbe:
|
884
|
+
httpGet:
|
885
|
+
path: "/status/started"
|
886
|
+
port: probe-port
|
887
|
+
failureThreshold: 30
|
888
|
+
periodSeconds: 10
|
889
|
+
livenessProbe:
|
890
|
+
httpGet:
|
891
|
+
path: "/status/connected"
|
892
|
+
port: probe-port
|
893
|
+
failureThreshold: 1
|
894
|
+
periodSeconds: 10
|
895
|
+
```
|
896
|
+
|
840
897
|
## Contribute
|
841
898
|
|
842
899
|
Contributions are welcomed and appreciated 🙏
|
@@ -0,0 +1 @@
|
|
1
|
+
GoodJob = {};
|