process_bot 0.1.23 → 0.1.24
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 +1 -0
- data/Gemfile.lock +1 -1
- data/lib/process_bot/process/runner.rb +13 -1
- data/lib/process_bot/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: '00099fd449ad79c57c052e10342f74b462ac806decd93e5989e0ad12620f42c3'
|
|
4
|
+
data.tar.gz: 40f29096a018160dca9e7ed7e5e0f5513876271259fe5dc44a4cdee0b8f38013
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ec891a1ce47000bd291c9980baccfc42f8e35d0a39c53292759d2c4f810c223668a06c4d525690bdb230aef881cd36d34695c9ae73e33ed7c504dc16289715e4
|
|
7
|
+
data.tar.gz: b51ee6883d7f5bcb338512153f0d40073b003011de87dd91c40a5e2201b4ee58999679379f696517804112791e54450ad80a73df8341c52a46f23737ed9f0438
|
data/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
- Bump version to 0.1.21.
|
|
8
8
|
- Add optional Sidekiq restart overlap and a new ProcessBot restart command.
|
|
9
9
|
- Guard stop-related process scanning when subprocess PID/PGID is unavailable and fail stop loudly.
|
|
10
|
+
- Wait briefly for subprocess PID assignment during stop; raise if PID is still missing so stop cannot silently succeed.
|
|
10
11
|
|
|
11
12
|
## [0.1.0] - 2022-04-03
|
|
12
13
|
|
data/Gemfile.lock
CHANGED
|
@@ -139,11 +139,23 @@ class ProcessBot::Process::Runner
|
|
|
139
139
|
end
|
|
140
140
|
|
|
141
141
|
def ensure_subprocess_pgid_for_stop!
|
|
142
|
-
|
|
142
|
+
wait_for_subprocess_pid_for_stop! if subprocess_pid.nil?
|
|
143
|
+
|
|
144
|
+
return true if subprocess_pgid
|
|
143
145
|
|
|
144
146
|
raise "Unable to stop related processes because subprocess PGID could not be resolved (subprocess PID: #{subprocess_pid.inspect})"
|
|
145
147
|
end
|
|
146
148
|
|
|
149
|
+
def wait_for_subprocess_pid_for_stop!
|
|
150
|
+
deadline = Process.clock_gettime(Process::CLOCK_MONOTONIC) + 1
|
|
151
|
+
|
|
152
|
+
sleep 0.05 while subprocess_pid.nil? && Process.clock_gettime(Process::CLOCK_MONOTONIC) < deadline
|
|
153
|
+
|
|
154
|
+
return unless subprocess_pid.nil?
|
|
155
|
+
|
|
156
|
+
raise "Unable to stop related processes because subprocess PID has not been recorded yet"
|
|
157
|
+
end
|
|
158
|
+
|
|
147
159
|
def find_sidekiq_pid
|
|
148
160
|
Thread.new do
|
|
149
161
|
wait_for_sidekiq_pid
|
data/lib/process_bot/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: process_bot
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.24
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- kaspernj
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-02-
|
|
11
|
+
date: 2026-02-12 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: knjrbfw
|