good_job 3.12.7 → 3.12.8

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: 24b3e7de3de7bb0365a230607a0f1f566d431adcd508ce7ee23406164c6528bc
4
- data.tar.gz: cd84291baf21cbaabbc543510851481ee835278bd1e844380be99fff749e0702
3
+ metadata.gz: 92bd0503979e96fb9119be0be1afd74b7be8594a3c377026c06ea55dcb26a3ee
4
+ data.tar.gz: fedebf29ee5a4100414367687958e6c8cfcc1bce938618344466bf86e454aacc
5
5
  SHA512:
6
- metadata.gz: d79680539f1dfabf4076e313207a54b3f38370f31ca855fdc3cf5bfc20799dd2e6b2495274055a45027459f31439dd11677f270ef823ec6c64b8f44359691312
7
- data.tar.gz: 1606e6811d188bd18d56d368fe712871193283c93f3f52c5300052884e4ca1fbb3e8ab502499add0b9364780eca13154ca9cb6c2bfdc8674ca3dd6b157f28209
6
+ metadata.gz: 3eb60ccb026da7584b87968cd89bf1df4fc763c208271d4cde46c3c831ac8887cec7eb10f607ebfb57d1c790ec0529683fb578f6bf094809d0fc43ebaf8c3c06
7
+ data.tar.gz: 425dd0a42e51c79710589948c0b99e9a148e31d524265772c4e931c9b610a7fa2bc0de0123ca8038afab42abf85e22f9083f76a151837608f0e07327aef8796a
data/CHANGELOG.md CHANGED
@@ -1,17 +1,29 @@
1
1
  # Changelog
2
2
 
3
- ## [v3.12.7](https://github.com/bensheldon/good_job/tree/v3.12.7) (2023-03-01)
3
+ ## [v3.12.8](https://github.com/bensheldon/good_job/tree/v3.12.8) (2023-03-06)
4
4
 
5
- [Full Changelog](https://github.com/bensheldon/good_job/compare/v3.12.6...v3.12.7)
5
+ [Full Changelog](https://github.com/bensheldon/good_job/compare/v3.12.7...v3.12.8)
6
6
 
7
7
  **Fixed bugs:**
8
8
 
9
- - Rename "assets" to "frontends" to avoid Asset Pipeline collisions [\#874](https://github.com/bensheldon/good_job/pull/874) ([bensheldon](https://github.com/bensheldon))
9
+ - Add `raise: false` to FrontendsController after action skip [\#881](https://github.com/bensheldon/good_job/pull/881) ([simi](https://github.com/simi))
10
10
 
11
11
  **Closed issues:**
12
12
 
13
13
  - GoodJob's JavaScript takes precedence over application's JavaScript in GoodJob 3.12.6, Rails 7 [\#873](https://github.com/bensheldon/good_job/issues/873)
14
14
 
15
+ **Merged pull requests:**
16
+
17
+ - Rewrite flaky tests: don't allow nil timeout for restart [\#872](https://github.com/bensheldon/good_job/pull/872) ([bensheldon](https://github.com/bensheldon))
18
+
19
+ ## [v3.12.7](https://github.com/bensheldon/good_job/tree/v3.12.7) (2023-03-01)
20
+
21
+ [Full Changelog](https://github.com/bensheldon/good_job/compare/v3.12.6...v3.12.7)
22
+
23
+ **Fixed bugs:**
24
+
25
+ - Rename "assets" to "frontends" to avoid Asset Pipeline collisions [\#874](https://github.com/bensheldon/good_job/pull/874) ([bensheldon](https://github.com/bensheldon))
26
+
15
27
  ## [v3.12.6](https://github.com/bensheldon/good_job/tree/v3.12.6) (2023-03-01)
16
28
 
17
29
  [Full Changelog](https://github.com/bensheldon/good_job/compare/v3.12.5...v3.12.6)
@@ -158,7 +170,7 @@
158
170
 
159
171
  **Closed issues:**
160
172
 
161
- - Support for Ruby 3.2 [\#785](https://github.com/bensheldon/good_job/issues/785)
173
+ - Support for Rails 6.1 / Ruby 3.2 [\#785](https://github.com/bensheldon/good_job/issues/785)
162
174
  - Custom table names [\#748](https://github.com/bensheldon/good_job/issues/748)
163
175
  - Health check issue with cron scheduler job [\#741](https://github.com/bensheldon/good_job/issues/741)
164
176
 
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
  module GoodJob
3
3
  class FrontendsController < ActionController::Base # rubocop:disable Rails/ApplicationController
4
- skip_after_action :verify_same_origin_request
4
+ skip_after_action :verify_same_origin_request, raise: false
5
5
 
6
6
  STATIC_ASSETS = {
7
7
  css: {
@@ -55,9 +55,11 @@ module GoodJob
55
55
  end
56
56
 
57
57
  # Shutdown and then start the capsule again.
58
- # @param timeout [nil, Numeric, Symbol] Seconds to wait for active threads.
58
+ # @param timeout [Numeric, Symbol] Seconds to wait for active threads.
59
59
  # @return [void]
60
60
  def restart(timeout: :default)
61
+ raise ArgumentError, "Capsule#restart cannot be called with a timeout of nil" if timeout.nil?
62
+
61
63
  shutdown(timeout: timeout)
62
64
  start
63
65
  end
@@ -132,11 +132,13 @@ module GoodJob # :nodoc:
132
132
 
133
133
  # Restart the Scheduler.
134
134
  # When shutdown, start; or shutdown and start.
135
- # @param timeout [nil, Numeric] Seconds to wait for actively executing jobs to finish; shares same values as {#shutdown}.
135
+ # @param timeout [Numeric] Seconds to wait for actively executing jobs to finish; shares same values as {#shutdown}.
136
136
  # @return [void]
137
137
  def restart(timeout: -1)
138
+ raise ArgumentError, "Scheduler#restart cannot be called with a timeout of nil" if timeout.nil?
139
+
138
140
  instrument("scheduler_restart_pools") do
139
- shutdown(timeout: timeout) if running?
141
+ shutdown(timeout: timeout)
140
142
  create_executor
141
143
  warm_cache
142
144
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
  module GoodJob
3
3
  # GoodJob gem version.
4
- VERSION = '3.12.7'
4
+ VERSION = '3.12.8'
5
5
  end
data/lib/good_job.rb CHANGED
@@ -131,7 +131,7 @@ module GoodJob
131
131
  # When forking processes you should shut down these background threads before forking, and restart them after forking.
132
132
  # For example, you should use +shutdown+ and +restart+ when using async execution mode with Puma.
133
133
  # See the {file:README.md#executing-jobs-async--in-process} for more explanation and examples.
134
- # @param timeout [Numeric, nil] Seconds to wait for active threads to finish.
134
+ # @param timeout [Numeric] Seconds to wait for active threads to finish.
135
135
  # @return [void]
136
136
  def self.restart(timeout: -1)
137
137
  _shutdown_all(Capsule.instances, :restart, timeout: timeout)
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.12.7
4
+ version: 3.12.8
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-03-01 00:00:00.000000000 Z
11
+ date: 2023-03-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activejob