good_job 1.1.4 → 1.2.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7134108a565e8b1efaa825cec90630cab0965fcfca5ff02f09751730f8839bdc
4
- data.tar.gz: d887e3b6cbb6d3d877793b186de2c0ca5a65178b968b2000821c6f9000c0fdd1
3
+ metadata.gz: 5fbc2c6b6b2d464188d5c89aa0d1a270c753bea661cda246ac41a4a86fa9cd77
4
+ data.tar.gz: 5fa873aa2732881e5b42cc63bbf2bdfe8fd823f224380fdc5c7e92e665b96584
5
5
  SHA512:
6
- metadata.gz: cce4a02b62ded08da0b2665cb346bfbeda6fdffa15182c8ab680962f6ba1f3534a8b9ac4cad8ecfa60d34b15cdfaabff5c8c80e4b3f7bdaa99c2d7a0e4208fe9
7
- data.tar.gz: d9f13feb39a8700fe889c7b4250004095cdddeb5e1e9f06426610d10c13ce7c14d20db32810aa93dd4d1b7a075f585821bf4581634373a3585540bab0018f46c
6
+ metadata.gz: d7278790575965381edc0c5b9ee478e4156bbfe4dc97e9304dfed5a60f6d89043bf1ff567249680ff24aa85dd6a3b1539fda519e98a19762b02d657b1d943630
7
+ data.tar.gz: ce1bc4d1c2d9fa480f1a7544010f58ee7d1b656fe31d77869999e265cf3d0481a9da1e95ee855a351e36f11d992fb40ac85113cf0d0082c22e4988ca32ee149c
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## [v1.2.0](https://github.com/bensheldon/good_job/tree/v1.2.0) (2020-08-19)
4
+
5
+ [Full Changelog](https://github.com/bensheldon/good_job/compare/v1.1.4...v1.2.0)
6
+
7
+ **Merged pull requests:**
8
+
9
+ - Document GoodJob module [\#83](https://github.com/bensheldon/good_job/pull/83) ([bensheldon](https://github.com/bensheldon))
10
+
3
11
  ## [v1.1.4](https://github.com/bensheldon/good_job/tree/v1.1.4) (2020-08-19)
4
12
 
5
13
  [Full Changelog](https://github.com/bensheldon/good_job/compare/v1.1.3...v1.1.4)
@@ -51,6 +59,7 @@
51
59
  **Merged pull requests:**
52
60
 
53
61
  - Allow instantiation of multiple schedulers via --queues [\#76](https://github.com/bensheldon/good_job/pull/76) ([bensheldon](https://github.com/bensheldon))
62
+ - Extract options parsing to Configuration object [\#74](https://github.com/bensheldon/good_job/pull/74) ([bensheldon](https://github.com/bensheldon))
54
63
 
55
64
  ## [v1.1.0](https://github.com/bensheldon/good_job/tree/v1.1.0) (2020-08-10)
56
65
 
@@ -85,7 +94,6 @@
85
94
 
86
95
  **Merged pull requests:**
87
96
 
88
- - Extract options parsing to Configuration object [\#74](https://github.com/bensheldon/good_job/pull/74) ([bensheldon](https://github.com/bensheldon))
89
97
  - Re-perform a job if a StandardError bubbles up; better document job reliability [\#62](https://github.com/bensheldon/good_job/pull/62) ([bensheldon](https://github.com/bensheldon))
90
98
  - Update the setup documentation to use correct bin setup command [\#61](https://github.com/bensheldon/good_job/pull/61) ([jm96441n](https://github.com/jm96441n))
91
99
 
@@ -108,7 +116,7 @@
108
116
 
109
117
  **Merged pull requests:**
110
118
 
111
- - Allow preservation of finished job records [\#46](https://github.com/bensheldon/good_job/pull/46) ([bensheldon](https://github.com/bensheldon))
119
+ - Change threadpool idletime default to 60 seconds from 0 [\#49](https://github.com/bensheldon/good_job/pull/49) ([bensheldon](https://github.com/bensheldon))
112
120
 
113
121
  ## [v1.0.0](https://github.com/bensheldon/good_job/tree/v1.0.0) (2020-07-20)
114
122
 
@@ -118,6 +126,10 @@
118
126
 
119
127
  [Full Changelog](https://github.com/bensheldon/good_job/compare/v0.8.2...v0.9.0)
120
128
 
129
+ **Merged pull requests:**
130
+
131
+ - Allow preservation of finished job records [\#46](https://github.com/bensheldon/good_job/pull/46) ([bensheldon](https://github.com/bensheldon))
132
+
121
133
  ## [v0.8.2](https://github.com/bensheldon/good_job/tree/v0.8.2) (2020-07-18)
122
134
 
123
135
  [Full Changelog](https://github.com/bensheldon/good_job/compare/v0.8.1...v0.8.2)
@@ -145,7 +157,6 @@
145
157
 
146
158
  **Merged pull requests:**
147
159
 
148
- - Change threadpool idletime default to 60 seconds from 0 [\#49](https://github.com/bensheldon/good_job/pull/49) ([bensheldon](https://github.com/bensheldon))
149
160
  - Replace Adapter inline boolean kwarg with execution\_mode instead [\#41](https://github.com/bensheldon/good_job/pull/41) ([bensheldon](https://github.com/bensheldon))
150
161
 
151
162
  ## [v0.7.0](https://github.com/bensheldon/good_job/tree/v0.7.0) (2020-07-16)
@@ -15,13 +15,38 @@ require 'good_job/notifier'
15
15
 
16
16
  require 'active_job/queue_adapters/good_job_adapter'
17
17
 
18
+ # GoodJob is a multithreaded, Postgres-based, ActiveJob backend for Ruby on Rails.
19
+ #
20
+ # +GoodJob+ is the top-level namespace and exposes configuration attributes.
18
21
  module GoodJob
22
+ # @!attribute [rw] logger
23
+ # @!scope class
24
+ # The logger used by GoodJob
25
+ # @return [Logger]
19
26
  mattr_accessor :logger, default: ActiveSupport::TaggedLogging.new(ActiveSupport::Logger.new(STDOUT))
27
+
28
+ # @!attribute [rw] preserve_job_records
29
+ # @!scope class
30
+ # Whether to preserve job records in the database after they have finished for inspection
31
+ # @return [Boolean]
20
32
  mattr_accessor :preserve_job_records, default: false
33
+
34
+ # @!attribute [rw] reperform_jobs_on_standard_error
35
+ # @!scope class
36
+ # Whether to re-perform a job when a type of +StandardError+ is raised and bubbles up to the GoodJob backend
37
+ # @return [Boolean]
21
38
  mattr_accessor :reperform_jobs_on_standard_error, default: true
22
- mattr_accessor :on_thread_error, default: nil
23
39
 
24
- ActiveSupport.run_load_hooks(:good_job, self)
40
+ # @!attribute [rw] on_thread_error
41
+ # @!scope class
42
+ # Called when a thread raises an error
43
+ # @example Send errors to Sentry
44
+ # # config/initializers/good_job.rb
45
+ #
46
+ # # With Sentry (or Bugsnag, Airbrake, Honeybadger, etc.)
47
+ # GoodJob.on_thread_error = -> (exception) { Raven.capture_exception(exception) }
48
+ # @return [#call, nil]
49
+ mattr_accessor :on_thread_error, default: nil
25
50
 
26
51
  # Shuts down all execution pools
27
52
  # @param wait [Boolean] whether to wait for shutdown
@@ -43,4 +68,6 @@ module GoodJob
43
68
  Notifier.instances.each(&:restart)
44
69
  Scheduler.instances.each(&:restart)
45
70
  end
71
+
72
+ ActiveSupport.run_load_hooks(:good_job, self)
46
73
  end
@@ -1,3 +1,3 @@
1
1
  module GoodJob
2
- VERSION = '1.1.4'.freeze
2
+ VERSION = '1.2.0'.freeze
3
3
  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: 1.1.4
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Sheldon
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-08-19 00:00:00.000000000 Z
11
+ date: 2020-08-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: concurrent-ruby