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 +4 -4
- data/.github/workflows/rubocop.yml +1 -1
- data/AUTHORS.md +1 -0
- data/CHANGELOG.md +7 -0
- data/README.md +2 -2
- data/lib/resque/scheduler/configuration.rb +1 -1
- data/lib/resque/scheduler/logger_builder.rb +14 -4
- data/lib/resque/scheduler/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e3fea20c1e19d0477785e35cd8e568ed5edb31a1b3e5cb8b50b3bf6ceb8ed417
|
4
|
+
data.tar.gz: a015f8b83e75f674c2c74b477a656233a19ecc69ae10bbd8b1eca0a7d6328f23
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2847caf20385af6e97a6316d4e1dc9c69841948a43d913cfe430c7a45786924315e9cf1b8b57c5bd37aa26e68f34fcfd35c6289fd9d63e233bbc0071ce962251
|
7
|
+
data.tar.gz: 8d612a72c7a3b671125e03d2dd6738691e5a9abce0d2b9ef8060f312b5793570ccc6052541740a07e0b67760359c8a72c4fe5690cca8ae9216322eb65fbabe9c
|
data/AUTHORS.md
CHANGED
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 `'
|
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 "
|
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
|
@@ -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 '
|
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,
|
54
|
-
"
|
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:
|
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
|
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.
|
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-
|
15
|
+
date: 2023-08-20 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: bundler
|