good_job 2.7.0 → 2.7.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: f44a377e368104479ccd928977d0c99c673e468fdcce61530cdfef1ee045c61d
4
- data.tar.gz: 3a5b29ba222be53ee571036ed27275517cb810a03bbd9b6fa5733b215742ef50
3
+ metadata.gz: ad8ca019c816dee452b246cdaa6d806844bcbd6aca63da6e5d52c87828c9c8e4
4
+ data.tar.gz: 343c128a0d8477688e8f38d214add4c341dbfce694c19c6c2acf9cf7bb5c5cef
5
5
  SHA512:
6
- metadata.gz: 833b35f3faa5660d45e14adbb15d2b6f65c7a7cbc127ae0d6d9085844e55fe33c6c1b02cbb6196f5f753bdf7ec76cff18a1976cef3ca26288960f6028c6d3fac
7
- data.tar.gz: def64d311e93139e7232fddd9aec1f0c0e0ff49696680dede67f87705d3a0dbc9338d083f1f2a22fdfff572465032c6ec75c97dee1ece7ffac20ca46c76fdc6c
6
+ metadata.gz: d5153a01609aefefd4ac23319ba76755ba13ea64c749b9b582fda5a17a497c0d640e20e6db91aa9eb9b18042b62283acc8dd25c67f1389290291ae55c2187f33
7
+ data.tar.gz: e145b2a1d26eaf4b07e60ca8826e39216de230569f197f0eafae481b7716754aeb95a4bce54330e15389612f49361f320c8934965beca9c4c60d97f1a84f3b05
data/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
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
+
3
20
  ## [v2.7.0](https://github.com/bensheldon/good_job/tree/v2.7.0) (2021-11-10)
4
21
 
5
22
  [Full Changelog](https://github.com/bensheldon/good_job/compare/v2.6.2...v2.7.0)
data/README.md CHANGED
@@ -55,7 +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-healthcheck-probes)
58
+ - [CLI HTTP health check probes](#cli-http-health-check-probes)
59
59
  - [Contribute](#contribute)
60
60
  - [Gem development](#gem-development)
61
61
  - [Release](#release)
@@ -6,16 +6,16 @@ module GoodJob
6
6
  around_action :switch_locale
7
7
 
8
8
  content_security_policy do |policy|
9
- policy.default_src(:none) if policy.default_src.blank?
10
- policy.connect_src(:self) if policy.connect_src.blank?
11
- policy.base_uri(:none) if policy.base_uri.blank?
12
- policy.font_src(:self) if policy.font_src.blank?
13
- policy.img_src(:self, :data) if policy.img_src.blank?
14
- policy.object_src(:none) if policy.object_src.blank?
15
- policy.script_src(:self) if policy.script_src.blank?
16
- policy.style_src(:self) if policy.style_src.blank?
17
- policy.form_action(:self) if policy.form_action.blank?
18
- policy.frame_ancestors(:none) if policy.frame_ancestors.blank?
9
+ policy.default_src(:none) if policy.default_src(*policy.default_src).blank?
10
+ policy.connect_src(:self) if policy.connect_src(*policy.connect_src).blank?
11
+ policy.base_uri(:none) if policy.base_uri(*policy.base_uri).blank?
12
+ policy.font_src(:self) if policy.font_src(*policy.font_src).blank?
13
+ policy.img_src(:self, :data) if policy.img_src(*policy.img_src).blank?
14
+ policy.object_src(:none) if policy.object_src(*policy.object_src).blank?
15
+ policy.script_src(:self) if policy.script_src(*policy.script_src).blank?
16
+ policy.style_src(:self) if policy.style_src(*policy.style_src).blank?
17
+ policy.form_action(:self) if policy.form_action(*policy.form_action).blank?
18
+ policy.frame_ancestors(:none) if policy.frame_ancestors(*policy.frame_ancestors).blank?
19
19
  end
20
20
 
21
21
  before_action do
@@ -13,9 +13,6 @@ module GoodJob
13
13
  # @param queue_string [String] Queues to execute jobs from
14
14
  def initialize(queue_string)
15
15
  @queue_string = queue_string
16
-
17
- @job_query = Concurrent::Delay.new { GoodJob::Execution.queue_string(queue_string) }
18
- @parsed_queues = Concurrent::Delay.new { GoodJob::Execution.queue_parser(queue_string) }
19
16
  end
20
17
 
21
18
  # A meaningful name to identify the performer in logs and for debugging.
@@ -65,11 +62,11 @@ module GoodJob
65
62
  attr_reader :queue_string
66
63
 
67
64
  def job_query
68
- @job_query.value
65
+ @_job_query ||= GoodJob::Execution.queue_string(queue_string)
69
66
  end
70
67
 
71
68
  def parsed_queues
72
- @parsed_queues.value
69
+ @_parsed_queues ||= GoodJob::Execution.queue_parser(queue_string)
73
70
  end
74
71
  end
75
72
  end
@@ -24,7 +24,7 @@ module GoodJob
24
24
 
25
25
  included do
26
26
  # Default column to be used when creating Advisory Locks
27
- class_attribute :advisory_lockable_column, instance_accessor: false, default: Concurrent::Delay.new { primary_key }
27
+ class_attribute :advisory_lockable_column, instance_accessor: false, default: nil
28
28
 
29
29
  # Default Postgres function to be used for Advisory Locks
30
30
  class_attribute :advisory_lockable_function, default: "pg_try_advisory_lock"
@@ -161,10 +161,8 @@ module GoodJob
161
161
  end
162
162
  end
163
163
 
164
- # Allow advisory_lockable_column to be a `Concurrent::Delay`
165
164
  def _advisory_lockable_column
166
- column = advisory_lockable_column
167
- column.respond_to?(:value) ? column.value : column
165
+ advisory_lockable_column || primary_key
168
166
  end
169
167
 
170
168
  def supports_cte_materialization_specifiers?
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
  module GoodJob
3
3
  # GoodJob gem version.
4
- VERSION = '2.7.0'
4
+ VERSION = '2.7.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: 2.7.0
4
+ version: 2.7.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: 2021-11-10 00:00:00.000000000 Z
11
+ date: 2021-11-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activejob