resque-scheduler 4.9.0 → 4.10.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of resque-scheduler might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: be1ad7d71c519660fafb8b0ccdae4b2b508e9577a1af5dbb8a57f8c7bce1a02f
4
- data.tar.gz: 742e298554473ed422e15c420a981f38c446c333636d6cdd09cd511eebda4584
3
+ metadata.gz: e3fea20c1e19d0477785e35cd8e568ed5edb31a1b3e5cb8b50b3bf6ceb8ed417
4
+ data.tar.gz: a015f8b83e75f674c2c74b477a656233a19ecc69ae10bbd8b1eca0a7d6328f23
5
5
  SHA512:
6
- metadata.gz: 91874b66e46123e8ef0476518b98ee6a1923fba44d4feff923bdf1be0b2319da8a60141dbaf91c99e0a62817c8904c223c67f38a6b153b54fc63b8717aa5235d
7
- data.tar.gz: 55d87dfb5ec01b799f5062354bfa0d80b1194833b7a52eed0e4807f55f2bd50df7e231166ea73847c6195423b12ca76b4732b94409a755bdccf280e3ce2b739b
6
+ metadata.gz: 2847caf20385af6e97a6316d4e1dc9c69841948a43d913cfe430c7a45786924315e9cf1b8b57c5bd37aa26e68f34fcfd35c6289fd9d63e233bbc0071ce962251
7
+ data.tar.gz: 8d612a72c7a3b671125e03d2dd6738691e5a9abce0d2b9ef8060f312b5793570ccc6052541740a07e0b67760359c8a72c4fe5690cca8ae9216322eb65fbabe9c
@@ -14,7 +14,7 @@ jobs:
14
14
  matrix:
15
15
  os: [ubuntu-latest]
16
16
  ruby: [
17
- 2.4
17
+ 2.7
18
18
  ]
19
19
 
20
20
  steps:
data/AUTHORS.md CHANGED
@@ -89,3 +89,4 @@ Resque Scheduler authors
89
89
  - sawanoboly
90
90
  - serek
91
91
  - iloveitaly
92
+ - treacher
data/CHANGELOG.md CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  **ATTN**: This project uses [semantic versioning](http://semver.org/).
4
4
 
5
+ ## [4.10.0] - 2023-08-20
6
+ ### Added
7
+ * Add logfmt option for logging output (#763)
8
+
9
+ ### Fixed
10
+ * Rubocop Fixes (#771)
11
+
5
12
  ## [4.9.0] - 2023-05-31
6
13
  ### Changed
7
14
  - Adding batching to re-queuing for timestamp by @brennen-stripe in #767
data/README.md CHANGED
@@ -139,7 +139,7 @@ requiring `resque` and `resque/scheduler` (default empty).
139
139
  * `RESQUE_SCHEDULER_INTERVAL` - Interval in seconds for checking if a
140
140
  scheduled job must run (coerced with `Kernel#Float()`) (default `5`)
141
141
  * `LOGFILE` - Log file name (default empty, meaning `$stdout`)
142
- * `LOGFORMAT` - Log output format to use (either `'text'` or `'json'`,
142
+ * `LOGFORMAT` - Log output format to use (either `'text'`, `'json'` or `'logfmt'`,
143
143
  default `'text'`)
144
144
  * `PIDFILE` - If non-empty, write process PID to file (default empty)
145
145
  * `QUIET` - Silence most output if non-empty (equivalent to a level of
@@ -663,7 +663,7 @@ are toggled by environment variables:
663
663
  - `QUIET` will stop logging anything. Completely silent.
664
664
  - `VERBOSE` opposite of 'QUIET'; will log even debug information
665
665
  - `LOGFILE` specifies the file to write logs to. (default standard output)
666
- - `LOGFORMAT` specifies either "text" or "json" output format
666
+ - `LOGFORMAT` specifies either "text", "json" or "logfmt" output format
667
667
  (default "text")
668
668
 
669
669
  All of these variables are optional and will be given the following default
@@ -44,7 +44,7 @@ module Resque
44
44
  @logfile ||= environment['LOGFILE']
45
45
  end
46
46
 
47
- # Sets whether to log in 'text' or 'json'
47
+ # Sets whether to log in 'text', 'json' or 'logfmt'
48
48
  attr_writer :logformat
49
49
 
50
50
  def logformat
@@ -15,7 +15,7 @@ module Resque
15
15
  # - :quiet if logger needs to be silent for all levels. Default - false
16
16
  # - :verbose if there is a need in debug messages. Default - false
17
17
  # - :log_dev to output logs into a desired file. Default - STDOUT
18
- # - :format log format, either 'text' or 'json'. Default - 'text'
18
+ # - :format log format, either 'text', 'json' or 'logfmt'. Default - 'text'
19
19
  #
20
20
  # Example:
21
21
  #
@@ -32,6 +32,7 @@ module Resque
32
32
  # Returns an instance of MonoLogger
33
33
  def build
34
34
  logger = MonoLogger.new(@log_dev)
35
+ logger.progname = 'resque-scheduler'.freeze
35
36
  logger.level = level
36
37
  logger.formatter = send(:"#{@format}_formatter")
37
38
  logger
@@ -50,8 +51,8 @@ module Resque
50
51
  end
51
52
 
52
53
  def text_formatter
53
- proc do |severity, datetime, _progname, msg|
54
- "resque-scheduler: [#{severity}] #{datetime.iso8601}: #{msg}\n"
54
+ proc do |severity, datetime, progname, msg|
55
+ "#{progname}: [#{severity}] #{datetime.iso8601}: #{msg}\n"
55
56
  end
56
57
  end
57
58
 
@@ -59,7 +60,7 @@ module Resque
59
60
  proc do |severity, datetime, progname, msg|
60
61
  require 'json'
61
62
  JSON.dump(
62
- name: 'resque-scheduler',
63
+ name: progname,
63
64
  progname: progname,
64
65
  level: severity,
65
66
  timestamp: datetime.iso8601,
@@ -67,6 +68,15 @@ module Resque
67
68
  ) + "\n"
68
69
  end
69
70
  end
71
+
72
+ def logfmt_formatter
73
+ proc do |severity, datetime, progname, msg|
74
+ "timestamp=\"#{datetime.iso8601}\" " \
75
+ "level=\"#{severity}\" " \
76
+ "progname=\"#{progname}\" " \
77
+ "msg=\"#{msg}\"\n"
78
+ end
79
+ end
70
80
  end
71
81
  end
72
82
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Resque
4
4
  module Scheduler
5
- VERSION = '4.9.0'.freeze
5
+ VERSION = '4.10.0'.freeze
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: resque-scheduler
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.9.0
4
+ version: 4.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben VandenBos
@@ -12,7 +12,7 @@ authors:
12
12
  autorequire:
13
13
  bindir: exe
14
14
  cert_chain: []
15
- date: 2023-06-08 00:00:00.000000000 Z
15
+ date: 2023-08-20 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: bundler