logcraft-sidekiq 1.3.0 → 1.3.1
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 +4 -4
- data/CHANGELOG.md +6 -0
- data/lib/logcraft/sidekiq/job_context.rb +11 -2
- data/lib/logcraft/sidekiq/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: b0bca9317bdc8ba0ae978fe2d275f60e262faa7f4abb151a4e874b948134d5b4
|
|
4
|
+
data.tar.gz: 74cfdd01cf7b82fd6a04555badb45556ccd17ce4345a29018066c3c73d5a3090
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 73cf3a2fe599082a85f30d0e97d1203470e045b6e1ca1ed90a76b02f3acb5c7ac80647d51883944773ec3110ae74fc2fe80ed9d1186b719dd7e3910f5ab867ea
|
|
7
|
+
data.tar.gz: 5686e4fd9c05371468ec2ff29b33b6404044ba7a221438b54c500e1640fb35ed4a673c48de4ba9ea7075bd961d4b436e33dfc12f9dc70abbc298c98025db1e5f
|
data/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
|
|
|
4
4
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
5
5
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
6
6
|
|
|
7
|
+
## [1.3.1] - 2026-11-13
|
|
8
|
+
### Fixed
|
|
9
|
+
- Job `created_at` and `enqueued_at` are logged correctly on Sidekiq 8, which stores them as epoch milliseconds
|
|
10
|
+
(they were read as seconds, giving dates tens of thousands of years ahead).
|
|
11
|
+
Thanks to [@incubus](https://github.com/incubus) for contributing! ([#7](https://github.com/zormandi/logcraft-sidekiq/pull/7))
|
|
12
|
+
|
|
7
13
|
## [1.3.0] - 2026-02-06
|
|
8
14
|
### Added
|
|
9
15
|
- Bumped supported Sidekiq version to 8.
|
|
@@ -17,8 +17,8 @@ module Logcraft
|
|
|
17
17
|
jid: job['jid'],
|
|
18
18
|
queue: job['queue'],
|
|
19
19
|
worker: job_class(job),
|
|
20
|
-
created_at:
|
|
21
|
-
enqueued_at:
|
|
20
|
+
created_at: time_from(job['created_at']).iso8601(3),
|
|
21
|
+
enqueued_at: time_from(job['enqueued_at']).iso8601(3),
|
|
22
22
|
run_count: (job['retry_count'] || -1) + 2
|
|
23
23
|
}
|
|
24
24
|
info_hash[:bid] = job['bid'] if job['bid']
|
|
@@ -27,6 +27,15 @@ module Logcraft
|
|
|
27
27
|
info_hash
|
|
28
28
|
end
|
|
29
29
|
|
|
30
|
+
# Sidekiq 8 stores the timestamps as integer epoch milliseconds, earlier versions as float
|
|
31
|
+
# epoch seconds. Decided by type, as Sidekiq::JobRecord#time_from_timestamp does: a Sidekiq 8
|
|
32
|
+
# process still runs retries and scheduled jobs enqueued by an older one.
|
|
33
|
+
def time_from(timestamp)
|
|
34
|
+
return Time.at(timestamp) if timestamp.is_a?(Float)
|
|
35
|
+
|
|
36
|
+
Time.at(timestamp / 1000, timestamp % 1000, :millisecond)
|
|
37
|
+
end
|
|
38
|
+
|
|
30
39
|
def named_arguments_from(job)
|
|
31
40
|
{}.tap do |arguments|
|
|
32
41
|
params, arg_index = method_parameters_of(job), 0
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: logcraft-sidekiq
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.3.
|
|
4
|
+
version: 1.3.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Zoltan Ormandi
|
|
@@ -134,7 +134,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
134
134
|
- !ruby/object:Gem::Version
|
|
135
135
|
version: '0'
|
|
136
136
|
requirements: []
|
|
137
|
-
rubygems_version:
|
|
137
|
+
rubygems_version: 4.0.17
|
|
138
138
|
specification_version: 4
|
|
139
139
|
summary: A structured logging solution for Sidekiq, using Logcraft.
|
|
140
140
|
test_files: []
|