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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8bbfb02b4261c0c6164bae65b6a47ebceda70a1dd0b3b59835e1a48a9c58bc97
4
- data.tar.gz: f4306875809f7d8c5287ba9de5022ee1ac29da163a3448f0ed7de0492c9beccd
3
+ metadata.gz: ce7c73e437bf4a78efbf9422e4a5cb7cf05635b5f3c9cbca4cd44a9baa0ee2d9
4
+ data.tar.gz: f0b4513d2c4d75bc9f871ba2c64c7848789747cf797e32044d56eefdab961647
5
5
  SHA512:
6
- metadata.gz: 71c1383a610c4d230f7db3b02f09664de638ff5009b22f3b44fe3b7dedbfe0f2e0aad5fb791c6816adea711b0e3e20766dc406b40e21cfe109ae429e8d07d7fd
7
- data.tar.gz: d5e9beff88328ba42cc3a2bdf3167fd12acd7391b8c61e373664bc408b4055bcdb9fdb0915308b0fde7c521aea7527be63ba8e18d332458938a95a9401897832
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.4 on the tested Apple Silicon
71
- environment; normal processing remains parallel after `RUNNING`.
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
 
@@ -9,7 +9,7 @@ module SolidJobs
9
9
  module_function
10
10
 
11
11
  def mode
12
- Thread.current[MODE_KEY] || :disable
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
- Thread.current[MODE_KEY] = new_mode
21
+ Ractor.current[MODE_KEY] = new_mode
22
22
  begin
23
23
  yield
24
24
  ensure
25
- Thread.current[MODE_KEY] = previous
25
+ Ractor.current[MODE_KEY] = previous
26
26
  end
27
27
  else
28
- Thread.current[MODE_KEY] = new_mode
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
- Thread.current[STORAGE_KEY] ||= {}
66
+ Ractor.current[STORAGE_KEY] ||= {}
67
67
  end
68
68
  end
69
69
  end
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SolidJobs
4
- VERSION = "0.1.0"
4
+ VERSION = "0.1.1"
5
5
  end
6
6
 
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
- Thread.current[CONFIG_KEY] ||= Config.new
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
- Thread.current[CONFIG_KEY]&.close
47
- Thread.current[CONFIG_KEY] = configuration
48
+ Ractor.current[CONFIG_KEY]&.close
49
+ Ractor.current[CONFIG_KEY] = configuration
48
50
  end
49
51
 
50
52
  def reset!
51
- Thread.current[CONFIG_KEY]&.close
52
- Thread.current[CONFIG_KEY] = Config.new
53
+ Ractor.current[CONFIG_KEY]&.close
54
+ Ractor.current[CONFIG_KEY] = Config.new
53
55
  end
54
56
 
55
57
  def testing!(mode, &block)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: solid-jobs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nicolas Vandenbogaerde