julewire-active_job 1.0.0 → 1.0.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/docs/configuration.md +1 -1
- data/docs/propagation.md +3 -3
- data/julewire-active_job.gemspec +2 -2
- data/lib/julewire/active_job/configuration.rb +2 -1
- data/lib/julewire/active_job/job_execution.rb +20 -1
- data/lib/julewire/active_job/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 21ef818e5da1febb4f3f612cd025a0d1c1d1552ffeb6bd118739688007d6fb76
|
|
4
|
+
data.tar.gz: 253e29b031dd05980d2a5b314ef80fdcd65b597b3c329dc874e425ab950253e2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7709ff28c7e85d54d934446bb702f591d8039c7aaa6b792bdbadaa53ae2a36f906f5306b34ab566f517611d2245e84ace45710cc0693d559856718614e393e59
|
|
7
|
+
data.tar.gz: 0726b22af8206e3238307792143aea2072986f3a9704090bd8cadb4e910d86a331c06970dff8bffa3bc14ffbd7d5ceb46300d47f564d52c2833f99e8a2ebbf05
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
## Unreleased
|
|
2
2
|
|
|
3
|
+
## 1.0.1 - 2026-06-25
|
|
4
|
+
|
|
5
|
+
- Default propagation carrier byte limits to 64 KiB and record health when
|
|
6
|
+
oversized or malformed job carriers are ignored on restore.
|
|
7
|
+
- Require julewire 1.0.1 internal gems.
|
|
8
|
+
|
|
3
9
|
## 1.0.0 - 2026-06-21
|
|
4
10
|
|
|
5
11
|
- Initial release: ActiveJob execution summaries, structured events,
|
data/docs/configuration.md
CHANGED
|
@@ -17,7 +17,7 @@ apps pass a `Configuration` instance to `install!`.
|
|
|
17
17
|
|
|
18
18
|
| Option | Default | Purpose |
|
|
19
19
|
| --- | --- | --- |
|
|
20
|
-
| `carrier_max_bytes` | `
|
|
20
|
+
| `carrier_max_bytes` | `65_536` | Omit oversized carriers from serialized jobs. |
|
|
21
21
|
| `silence_log_subscriber` | `true` | Detach Active Job default text subscriber output. |
|
|
22
22
|
|
|
23
23
|
Example:
|
data/docs/propagation.md
CHANGED
|
@@ -7,9 +7,9 @@ job execution scope starts.
|
|
|
7
7
|
That lets upstream context flow into the job without emitting propagation-only
|
|
8
8
|
data by default.
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
context.
|
|
10
|
+
`carrier_max_bytes` defaults to `65_536`. Oversized carriers are omitted from
|
|
11
|
+
serialized job payloads and ignored on restore. The job still runs normally; it
|
|
12
|
+
starts without upstream Julewire context.
|
|
13
13
|
|
|
14
14
|
Generic job metadata such as class, id, queue, priority, execution count,
|
|
15
15
|
timestamps, and status is emitted in the record's `neutral` section as `job.*`
|
data/julewire-active_job.gemspec
CHANGED
|
@@ -35,7 +35,7 @@ Gem::Specification.new do |spec|
|
|
|
35
35
|
spec.require_paths = ["lib"]
|
|
36
36
|
|
|
37
37
|
spec.add_dependency "activejob", ">= 8.1"
|
|
38
|
-
spec.add_dependency "julewire-core", ">= 1.0"
|
|
39
|
-
spec.add_dependency "julewire-rails_support", ">= 1.0"
|
|
38
|
+
spec.add_dependency "julewire-core", ">= 1.0.1"
|
|
39
|
+
spec.add_dependency "julewire-rails_support", ">= 1.0.1"
|
|
40
40
|
spec.add_dependency "zeitwerk", ">= 2.8.1"
|
|
41
41
|
end
|
|
@@ -13,7 +13,8 @@ module Julewire
|
|
|
13
13
|
setting :silence_log_subscriber, default: true, predicate: true
|
|
14
14
|
setting :propagation, default: true, predicate: true
|
|
15
15
|
setting :carrier_key, default: Julewire::Core::Propagation::Carrier::DEFAULT_KEY
|
|
16
|
-
setting :carrier_max_bytes,
|
|
16
|
+
setting :carrier_max_bytes, default: Julewire::Core::Propagation::Carrier::DEFAULT_MAX_BYTES,
|
|
17
|
+
validate: byte_limit
|
|
17
18
|
setting :serialized_carrier_key, default: DEFAULT_SERIALIZED_CARRIER_KEY
|
|
18
19
|
setting :source, default: "active_job"
|
|
19
20
|
setting :summary_event, default: "job.completed"
|
|
@@ -10,13 +10,32 @@ module Julewire
|
|
|
10
10
|
carrier = carrier_for(job)
|
|
11
11
|
return perform_job(job, configuration, &) unless configuration.propagation?
|
|
12
12
|
|
|
13
|
-
Julewire::Core::Propagation::Carrier.
|
|
13
|
+
result = Julewire::Core::Propagation::Carrier.extract_result(
|
|
14
|
+
carrier,
|
|
15
|
+
key: configuration.carrier_key,
|
|
16
|
+
max_bytes: configuration.carrier_max_bytes
|
|
17
|
+
)
|
|
18
|
+
record_carrier_restore_failure(result)
|
|
19
|
+
|
|
20
|
+
Julewire::Core::Propagation.restore(result.envelope, owned: true) do
|
|
14
21
|
perform_job(job, configuration, &)
|
|
15
22
|
end
|
|
16
23
|
end
|
|
17
24
|
|
|
18
25
|
private
|
|
19
26
|
|
|
27
|
+
def record_carrier_restore_failure(result)
|
|
28
|
+
return unless result.failure?
|
|
29
|
+
|
|
30
|
+
IntegrationHealth.record_failure(
|
|
31
|
+
result.error,
|
|
32
|
+
action: :carrier_restore,
|
|
33
|
+
component: :job_execution,
|
|
34
|
+
status: result.status,
|
|
35
|
+
reason: result.reason
|
|
36
|
+
)
|
|
37
|
+
end
|
|
38
|
+
|
|
20
39
|
def perform_job(job, configuration, &)
|
|
21
40
|
fields = job_fields(job)
|
|
22
41
|
Core::Integration::Facade.with_execution(**execution_options(job, configuration, fields)) do
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: julewire-active_job
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Alexander Grebennik
|
|
@@ -29,28 +29,28 @@ dependencies:
|
|
|
29
29
|
requirements:
|
|
30
30
|
- - ">="
|
|
31
31
|
- !ruby/object:Gem::Version
|
|
32
|
-
version:
|
|
32
|
+
version: 1.0.1
|
|
33
33
|
type: :runtime
|
|
34
34
|
prerelease: false
|
|
35
35
|
version_requirements: !ruby/object:Gem::Requirement
|
|
36
36
|
requirements:
|
|
37
37
|
- - ">="
|
|
38
38
|
- !ruby/object:Gem::Version
|
|
39
|
-
version:
|
|
39
|
+
version: 1.0.1
|
|
40
40
|
- !ruby/object:Gem::Dependency
|
|
41
41
|
name: julewire-rails_support
|
|
42
42
|
requirement: !ruby/object:Gem::Requirement
|
|
43
43
|
requirements:
|
|
44
44
|
- - ">="
|
|
45
45
|
- !ruby/object:Gem::Version
|
|
46
|
-
version:
|
|
46
|
+
version: 1.0.1
|
|
47
47
|
type: :runtime
|
|
48
48
|
prerelease: false
|
|
49
49
|
version_requirements: !ruby/object:Gem::Requirement
|
|
50
50
|
requirements:
|
|
51
51
|
- - ">="
|
|
52
52
|
- !ruby/object:Gem::Version
|
|
53
|
-
version:
|
|
53
|
+
version: 1.0.1
|
|
54
54
|
- !ruby/object:Gem::Dependency
|
|
55
55
|
name: zeitwerk
|
|
56
56
|
requirement: !ruby/object:Gem::Requirement
|