good_job 3.17.2 → 3.17.4

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: 8c92206b4099b3be756adba01af60f4ef531eaf8cf02a9c9cdd17129214f929c
4
- data.tar.gz: 29f1e72a6b21d2f1e3d073d8b1bd9f4f2a78e417f69c21c195fc795f62ac4e5c
3
+ metadata.gz: e7b833bb3f1b28dca921562c3110e4147d955a98982f2b9481f9f7f2b41aa648
4
+ data.tar.gz: 4f230602f1f5a2faf5198035f207e6f206bc614078a8bce8f38f71613250a8bd
5
5
  SHA512:
6
- metadata.gz: 2906c0b22dc6f6b0f0e78c607467533598e84dce2a29e654321293da877f1afd09ee59afd534d7a7b7f1481ae796d111b2492f62ec2cddcde843442e4262adbe
7
- data.tar.gz: 0e8107f018f836e0d15f5836d93ebb8bdbe6e36381cba63680113302e3125f1a49d9aba5e05a2124ce50ec51cbfde7059ebed30b3cc5b64d859ce16867ae2c5e
6
+ metadata.gz: '0990adc9282acc9ad3b387f494b20e716e9f1f6ba37c1ec4da200dd89b53f8dd8d6cac60dc652323127086c837bf08bb02d3c28f1a75d589a1c435a897524b0d'
7
+ data.tar.gz: 961e5e7e3d522f07572f9031096b940408f3bc7568a46b475d45daeb37ae755e237f497cdbb3221e4419bde4d73a560d743f132359b7ee03ffc8062d24f99b23
data/CHANGELOG.md CHANGED
@@ -1,5 +1,37 @@
1
1
  # Changelog
2
2
 
3
+ ## [v3.17.4](https://github.com/bensheldon/good_job/tree/v3.17.4) (2023-08-24)
4
+
5
+ [Full Changelog](https://github.com/bensheldon/good_job/compare/v3.17.3...v3.17.4)
6
+
7
+ **Fixed bugs:**
8
+
9
+ - Handle edge case of logger not responding to silence [\#1049](https://github.com/bensheldon/good_job/pull/1049) ([bensheldon](https://github.com/bensheldon))
10
+
11
+ **Closed issues:**
12
+
13
+ - An idea for better .silence handling [\#1046](https://github.com/bensheldon/good_job/issues/1046)
14
+
15
+ ## [v3.17.3](https://github.com/bensheldon/good_job/tree/v3.17.3) (2023-08-19)
16
+
17
+ [Full Changelog](https://github.com/bensheldon/good_job/compare/v3.17.2...v3.17.3)
18
+
19
+ **Fixed bugs:**
20
+
21
+ - New probe server fixes: allow accept\_nonblock to raise and IO.gets return nil [\#1043](https://github.com/bensheldon/good_job/pull/1043) ([stas](https://github.com/stas))
22
+
23
+ **Closed issues:**
24
+
25
+ - Dashboard as separate package? [\#965](https://github.com/bensheldon/good_job/issues/965)
26
+ - Managing jobs with errors [\#929](https://github.com/bensheldon/good_job/issues/929)
27
+ - Feature: dynamic options for good\_job\_control\_concurrency\_with [\#684](https://github.com/bensheldon/good_job/issues/684)
28
+
29
+ **Merged pull requests:**
30
+
31
+ - Attempt to overcome github\_changelog\_generator's rate limit problem [\#1045](https://github.com/bensheldon/good_job/pull/1045) ([bensheldon](https://github.com/bensheldon))
32
+ - \[Doc\] for cron schedule add info about Dashboard view [\#1042](https://github.com/bensheldon/good_job/pull/1042) ([steveroot](https://github.com/steveroot))
33
+ - Add description of :class to readme for cron style repeating jobs section [\#1040](https://github.com/bensheldon/good_job/pull/1040) ([steveroot](https://github.com/steveroot))
34
+
3
35
  ## [v3.17.2](https://github.com/bensheldon/good_job/tree/v3.17.2) (2023-08-10)
4
36
 
5
37
  [Full Changelog](https://github.com/bensheldon/good_job/compare/v3.17.1...v3.17.2)
data/README.md CHANGED
@@ -473,7 +473,7 @@ GoodJob's concurrency control strategy for `perform_limit` is "optimistic retry
473
473
 
474
474
  ### Cron-style repeating/recurring jobs
475
475
 
476
- GoodJob can enqueue jobs on a recurring basis that can be used as a replacement for cron.
476
+ GoodJob can enqueue Active Job jobs on a recurring basis that can be used as a replacement for cron.
477
477
 
478
478
  Cron-style jobs can be performed by any GoodJob process (e.g., CLI or `:async` execution mode) that has `config.good_job.enable_cron` set to `true`. That is, one or more job executor processes can be configured to perform recurring jobs.
479
479
 
@@ -481,6 +481,8 @@ GoodJob's cron uses unique indexes to ensure that only a single job is enqueued
481
481
 
482
482
  Cron-format is parsed by the [`fugit`](https://github.com/floraison/fugit) gem, which has support for seconds-level resolution (e.g. `* * * * * *`) and natural language parsing (e.g. `every second`).
483
483
 
484
+ If you use the [Dashboard](#dashboard) the scheduled tasks can be viewed in the 'cron' menu. In this view you can also disable a task or run/enqueue a task immediately.
485
+
484
486
  ```ruby
485
487
  # config/environments/application.rb or a specific environment e.g. production.rb
486
488
 
@@ -492,10 +494,10 @@ config.good_job.cron = {
492
494
  # Every 15 minutes, enqueue `ExampleJob.set(priority: -10).perform_later(42, "life", name: "Alice")`
493
495
  frequent_task: { # each recurring job must have a unique key
494
496
  cron: "*/15 * * * *", # cron-style scheduling format by fugit gem
495
- class: "ExampleJob", # reference the Job class with a string
496
- args: [42, "life"], # positional arguments to pass; can also be a proc e.g. `-> { [Time.now] }`
497
- kwargs: { name: "Alice" }, # keyword arguments to pass; can also be a proc e.g. `-> { { name: NAMES.sample } }`
498
- set: { priority: -10 }, # additional ActiveJob properties; can also be a lambda/proc e.g. `-> { { priority: [1,2].sample } }`
497
+ class: "ExampleJob", # name of the job class as a String; must reference an Active Job job class
498
+ args: [42, "life"], # positional arguments to pass to the job; can also be a proc e.g. `-> { [Time.now] }`
499
+ kwargs: { name: "Alice" }, # keyword arguments to pass to the job; can also be a proc e.g. `-> { { name: NAMES.sample } }`
500
+ set: { priority: -10 }, # additional Active Job properties; can also be a lambda/proc e.g. `-> { { priority: [1,2].sample } }`
499
501
  description: "Something helpful", # optional description that appears in Dashboard
500
502
  },
501
503
  another_task: {
@@ -33,7 +33,7 @@ module GoodJob
33
33
  def self.with_logger_silenced(&block)
34
34
  # Assign to a local variable, just in case it's modified in another thread concurrently
35
35
  logger = self.logger
36
- if logger
36
+ if logger.respond_to? :silence
37
37
  logger.silence(&block)
38
38
  else
39
39
  yield
@@ -46,11 +46,13 @@ module GoodJob
46
46
  ready_sockets, = IO.select([@server], nil, nil, SOCKET_READ_TIMEOUT)
47
47
  next unless ready_sockets
48
48
 
49
- client = @server.accept_nonblock(exception: false)
49
+ client = @server.accept_nonblock
50
50
  request = client.gets
51
51
 
52
- status, headers, body = @app.call(parse_request(request))
53
- respond(client, status, headers, body)
52
+ if request
53
+ status, headers, body = @app.call(parse_request(request))
54
+ respond(client, status, headers, body)
55
+ end
54
56
 
55
57
  client.close
56
58
  rescue IO::WaitReadable, Errno::EINTR
@@ -2,7 +2,7 @@
2
2
 
3
3
  module GoodJob
4
4
  # GoodJob gem version.
5
- VERSION = '3.17.2'
5
+ VERSION = '3.17.4'
6
6
 
7
7
  # GoodJob version as Gem::Version object
8
8
  GEM_VERSION = Gem::Version.new(VERSION)
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.17.2
4
+ version: 3.17.4
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-08-10 00:00:00.000000000 Z
11
+ date: 2023-08-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activejob