solid-jobs 0.1.0 → 0.1.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 +14 -0
- data/docs/reliability.md +10 -2
- data/lib/solid_jobs/testing.rb +5 -5
- data/lib/solid_jobs/version.rb +1 -1
- data/lib/solid_jobs.rb +7 -5
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ce7c73e437bf4a78efbf9422e4a5cb7cf05635b5f3c9cbca4cd44a9baa0ee2d9
|
|
4
|
+
data.tar.gz: f0b4513d2c4d75bc9f871ba2c64c7848789747cf797e32044d56eefdab961647
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e6d245f323c4cdf117f2bb53584eed2e2c697a72fdc170792954d25feccb15b32d2cae7f3d8a337e7b29c3fedb071ab4ad9b773ac414fe893e389754532ca5af
|
|
7
|
+
data.tar.gz: 9abce08d1c4fb800a5f39e56fcebc266a7cc1dd52acd891fdaccf9fd1f2840ead4a3c4ce0a5649acc6c27a8f26ad5554d0599a5eb55f8e742afc568a307ddc09
|
data/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,20 @@ All notable changes to this project will be documented in this file.
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
+
## [0.1.1] - 2026-10-01
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
|
|
11
|
+
- `SolidJobs.config` and the testing mode are now Ractor-local instead of
|
|
12
|
+
thread-local. Jobs enqueued from threads spawned after configuration (Puma
|
|
13
|
+
workers, Rails request threads) no longer fall back to a default
|
|
14
|
+
`localhost:6379` Redis.
|
|
15
|
+
|
|
16
|
+
### Changed
|
|
17
|
+
|
|
18
|
+
- `rake stress` no longer runs the Ruby 3.4 concurrent-startup crash
|
|
19
|
+
reproducer; use `rake startup_torture` explicitly.
|
|
20
|
+
|
|
7
21
|
## [0.1.0] - 2026-09-30
|
|
8
22
|
|
|
9
23
|
### Added
|
data/docs/reliability.md
CHANGED
|
@@ -67,8 +67,16 @@ BOOTING -> ALL_READY -> RUNNING
|
|
|
67
67
|
Boot failure is terminal. Already-ready components receive `:abort`, close
|
|
68
68
|
their local resources, and never enter their fetch loops. Cleanup is
|
|
69
69
|
idempotent. Component startup is serialized, avoiding concurrent TCP/RESP
|
|
70
|
-
initialization paths known to crash Ruby 3.4
|
|
71
|
-
|
|
70
|
+
initialization paths known to crash Ruby 3.4 (reproduced on 3.4.4 macOS arm64
|
|
71
|
+
and 3.4.11 Linux x86_64; `rake startup_torture` is the reproducer); normal
|
|
72
|
+
processing remains parallel after `RUNNING`.
|
|
73
|
+
|
|
74
|
+
## Configuration scope
|
|
75
|
+
|
|
76
|
+
`SolidJobs.config` and the testing mode are Ractor-local, not thread-local.
|
|
77
|
+
Every thread and fiber inside a Ractor (for example Puma workers or Rails
|
|
78
|
+
request threads) shares the configuration set on that Ractor, while each
|
|
79
|
+
Ractor keeps its own isolated configuration.
|
|
72
80
|
|
|
73
81
|
## Integrity auditing
|
|
74
82
|
|
data/lib/solid_jobs/testing.rb
CHANGED
|
@@ -9,7 +9,7 @@ module SolidJobs
|
|
|
9
9
|
module_function
|
|
10
10
|
|
|
11
11
|
def mode
|
|
12
|
-
|
|
12
|
+
Ractor.current[MODE_KEY] || :disable
|
|
13
13
|
end
|
|
14
14
|
|
|
15
15
|
def testing!(new_mode)
|
|
@@ -18,14 +18,14 @@ module SolidJobs
|
|
|
18
18
|
|
|
19
19
|
if block_given?
|
|
20
20
|
previous = mode
|
|
21
|
-
|
|
21
|
+
Ractor.current[MODE_KEY] = new_mode
|
|
22
22
|
begin
|
|
23
23
|
yield
|
|
24
24
|
ensure
|
|
25
|
-
|
|
25
|
+
Ractor.current[MODE_KEY] = previous
|
|
26
26
|
end
|
|
27
27
|
else
|
|
28
|
-
|
|
28
|
+
Ractor.current[MODE_KEY] = new_mode
|
|
29
29
|
end
|
|
30
30
|
end
|
|
31
31
|
|
|
@@ -63,7 +63,7 @@ module SolidJobs
|
|
|
63
63
|
end
|
|
64
64
|
|
|
65
65
|
def storage
|
|
66
|
-
|
|
66
|
+
Ractor.current[STORAGE_KEY] ||= {}
|
|
67
67
|
end
|
|
68
68
|
end
|
|
69
69
|
end
|
data/lib/solid_jobs/version.rb
CHANGED
data/lib/solid_jobs.rb
CHANGED
|
@@ -33,8 +33,10 @@ module SolidJobs
|
|
|
33
33
|
|
|
34
34
|
module_function
|
|
35
35
|
|
|
36
|
+
# Configuration is Ractor-local: every thread and fiber inside a Ractor
|
|
37
|
+
# shares it, while each Ractor keeps its own isolated configuration.
|
|
36
38
|
def config
|
|
37
|
-
|
|
39
|
+
Ractor.current[CONFIG_KEY] ||= Config.new
|
|
38
40
|
end
|
|
39
41
|
|
|
40
42
|
def configure
|
|
@@ -43,13 +45,13 @@ module SolidJobs
|
|
|
43
45
|
end
|
|
44
46
|
|
|
45
47
|
def use_config(configuration)
|
|
46
|
-
|
|
47
|
-
|
|
48
|
+
Ractor.current[CONFIG_KEY]&.close
|
|
49
|
+
Ractor.current[CONFIG_KEY] = configuration
|
|
48
50
|
end
|
|
49
51
|
|
|
50
52
|
def reset!
|
|
51
|
-
|
|
52
|
-
|
|
53
|
+
Ractor.current[CONFIG_KEY]&.close
|
|
54
|
+
Ractor.current[CONFIG_KEY] = Config.new
|
|
53
55
|
end
|
|
54
56
|
|
|
55
57
|
def testing!(mode, &block)
|