Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions lib/async/container/generic.rb
Original file line number Diff line number Diff line change
Expand Up @@ -203,11 +203,13 @@ def spawn(name: nil, restart: false, key: nil, health_check_timeout: nil, &block
age_clock&.reset!
end
end
rescue => error
Console.error(self, "Error during child process management!", exception: error, running: @running)
ensure
delete(key, child)
end

if status.success?
if status&.success?
Console.info(self, "Child exited successfully.", status: status, running: @running)
else
@statistics.failure!
Expand All @@ -220,9 +222,6 @@ def spawn(name: nil, restart: false, key: nil, health_check_timeout: nil, &block
break
end
end
rescue => error
Console.error(self, "Failure during child process management!", exception: error, running: @running)
raise
ensure
Console.info(self, "Child process management loop exited.", running: @running)
end.resume
Expand Down
Loading