good_job 3.15.0 → 3.15.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9aa61d924db48712cf404f47b7a6f5b977f1464a29b7e97f068b21422ac8261a
4
- data.tar.gz: 9701e674925f45189bb8763f31d35a11eeb8d1f02f132cd4cc7e3db1fa6221f7
3
+ metadata.gz: 95ede69036445ced25b5afed25912ce509a171d7311e7a5c2c91d3b9615c0482
4
+ data.tar.gz: 141500358218a98d7e84b5415b1f1d8afb92243a5695928370b5497906716ae3
5
5
  SHA512:
6
- metadata.gz: 8a07c81b1a23c12b26c21c8d3316bc01ee931e0313d3f51d811564fe80dacf86efd8a1d37f693be0e4d893983ce9aaeeccbb5c0e523410815fea052287b56c3b
7
- data.tar.gz: 46e3e5a9fe2c7fd8e82a51494e4fac3c480f0e323db1aab57ea2291d7f7db39284f0a9da70692e5b160312894f69ec31453279f541f61cbec99bfb091012af26
6
+ metadata.gz: 997b09e9a348d9b11fd67521a54222909f4e495ecede63bcc253473e4a8544fdaa40f3e77171dbbb35692f8f1f77290b51cbf80bfc50817422f94efdbed3c83a
7
+ data.tar.gz: f64e80caca4d1c31449af26e146b77a0d71c53ca09bc2c8370c0190daafe0565380d0bc60ca42fb20a84e5be41c50c23b7f4b4c0674f69a3bff47c5c43fcf537
data/CHANGELOG.md CHANGED
@@ -1,5 +1,33 @@
1
1
  # Changelog
2
2
 
3
+ ## [v3.15.1](https://github.com/bensheldon/good_job/tree/v3.15.1) (2023-04-17)
4
+
5
+ [Full Changelog](https://github.com/bensheldon/good_job/compare/v3.15.0...v3.15.1)
6
+
7
+ **Implemented enhancements:**
8
+
9
+ - Support for Batches? [\#417](https://github.com/bensheldon/good_job/issues/417)
10
+
11
+ **Fixed bugs:**
12
+
13
+ - Fix setting of locale via routes `mount ... defaults: { locale: :en }` [\#923](https://github.com/bensheldon/good_job/pull/923) ([bensheldon](https://github.com/bensheldon))
14
+ - Set `successfully_enqueued?` when using `perform_all_later` [\#917](https://github.com/bensheldon/good_job/pull/917) ([bensheldon](https://github.com/bensheldon))
15
+
16
+ **Closed issues:**
17
+
18
+ - GoodJob has pending database migrations after v2 -\> v3 [\#920](https://github.com/bensheldon/good_job/issues/920)
19
+ - Batch docs in README suggest `Batch#add` is a class method, but it's not [\#912](https://github.com/bensheldon/good_job/issues/912)
20
+ - How do I clear queue during tests? [\#887](https://github.com/bensheldon/good_job/issues/887)
21
+ - Implement batch functionality [\#691](https://github.com/bensheldon/good_job/issues/691)
22
+
23
+ **Merged pull requests:**
24
+
25
+ - In tests, directly use `connection.truncate_tables` instead of `ActiveRecord::Tasks::DatabaseTasks.truncate_all` [\#918](https://github.com/bensheldon/good_job/pull/918) ([bensheldon](https://github.com/bensheldon))
26
+ - Use `GoodJob.capsule` in CLI instead of creating a new Capsule [\#916](https://github.com/bensheldon/good_job/pull/916) ([bensheldon](https://github.com/bensheldon))
27
+ - Fix lint: missing fr and nl translations; readme whitespace [\#914](https://github.com/bensheldon/good_job/pull/914) ([bensheldon](https://github.com/bensheldon))
28
+ - Switches from Chrome to Chromium to support Apple M1/Arm CPUs [\#910](https://github.com/bensheldon/good_job/pull/910) ([ckdake](https://github.com/ckdake))
29
+ - Bump erb\_lint from 0.3.1 to 0.4.0 [\#906](https://github.com/bensheldon/good_job/pull/906) ([dependabot[bot]](https://github.com/apps/dependabot))
30
+
3
31
  ## [v3.15.0](https://github.com/bensheldon/good_job/tree/v3.15.0) (2023-04-02)
4
32
 
5
33
  [Full Changelog](https://github.com/bensheldon/good_job/compare/v3.14.2...v3.15.0)
data/README.md CHANGED
@@ -537,6 +537,7 @@ Batches track a set of jobs, and enqueue an optional callback job when all of th
537
537
  - Jobs can be added to an existing batch. Jobs in a batch are enqueued and performed immediately/asynchronously. The final callback job will not be enqueued until `GoodJob::Batch#enqueue` is called.
538
538
 
539
539
  ```ruby
540
+ batch = GoodJob::Batch.new
540
541
  batch = GoodJob::Batch.add do
541
542
  10.times { MyJob.perform_later }
542
543
  end
@@ -35,7 +35,9 @@ module GoodJob
35
35
  end
36
36
 
37
37
  def current_locale
38
- if params[:locale]
38
+ if request.GET['locale']
39
+ request.GET['locale']
40
+ elsif params[:locale]
39
41
  params[:locale]
40
42
  elsif good_job_available_locales.exclude?(I18n.default_locale) && I18n.available_locales.include?(:en)
41
43
  :en
@@ -78,8 +78,8 @@ fr:
78
78
  one: 1 jour
79
79
  other: "%{count} jours"
80
80
  x_minutes:
81
- one:
82
- other:
81
+ one: 1 minute
82
+ other: "%{count} minutes"
83
83
  x_months:
84
84
  one: 1 mois
85
85
  other: "%{count} mois"
@@ -130,8 +130,8 @@ fr:
130
130
  table:
131
131
  actions:
132
132
  apply_to_all:
133
- one:
134
- other:
133
+ one: Appliquer à tous les 1 travail.
134
+ other: Appliquer à tous les %{count} travaux.
135
135
  confirm_destroy_all: Voulez-vous vraiment détruire les travaux sélectionnés ?
136
136
  confirm_discard_all: Êtes-vous usure que vous souhaitez supprimer les emplois sélectionnés?
137
137
  confirm_reschedule_all: Voulez-vous vraiment reprogrammer les tâches sélectionnées ?
@@ -130,8 +130,8 @@ nl:
130
130
  table:
131
131
  actions:
132
132
  apply_to_all:
133
- one:
134
- other:
133
+ one: Toepassen op alle 1 baan.
134
+ other: Toepassen op alle %{count} banen.
135
135
  confirm_destroy_all: Weet u zeker dat u de geselecteerde jobs wilt vernietigen?
136
136
  confirm_discard_all: Wilt u de geselecteerde jobs verwijderen?
137
137
  confirm_reschedule_all: Weet u zeker dat u de geselecteerde taken opnieuw wilt inplannen?
@@ -64,6 +64,7 @@ module GoodJob
64
64
  job_id_to_provider_job_id = results.each_with_object({}) { |result, hash| hash[result['active_job_id']] = result['id'] }
65
65
  active_jobs.each do |active_job|
66
66
  active_job.provider_job_id = job_id_to_provider_job_id[active_job.job_id]
67
+ active_job.successfully_enqueued = active_job.provider_job_id.present? if active_job.respond_to?(:successfully_enqueued=)
67
68
  end
68
69
  executions.each do |execution|
69
70
  execution.instance_variable_set(:@new_record, false) if job_id_to_provider_job_id[execution.active_job_id]
data/lib/good_job/cli.rb CHANGED
@@ -92,10 +92,10 @@ module GoodJob
92
92
  set_up_application!
93
93
  GoodJob.configuration.options.merge!(options.symbolize_keys)
94
94
  configuration = GoodJob.configuration
95
+ capsule = GoodJob.capsule
95
96
 
96
97
  Daemon.new(pidfile: configuration.pidfile).daemonize if configuration.daemonize?
97
98
 
98
- capsule = GoodJob::Capsule.new
99
99
  capsule.start
100
100
 
101
101
  if configuration.probe_port
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
  module GoodJob
3
3
  # GoodJob gem version.
4
- VERSION = '3.15.0'
4
+ VERSION = '3.15.1'
5
5
  end
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: 3.15.0
4
+ version: 3.15.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Sheldon
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-04-02 00:00:00.000000000 Z
11
+ date: 2023-04-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activejob