File tree Expand file tree Collapse file tree 3 files changed +38
-0
lines changed
lib/async/container/notify Expand file tree Collapse file tree 3 files changed +38
-0
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,12 @@ def ready!(**message)
1717 send ( ready : true , **message )
1818 end
1919
20+ # Notify the parent controller that the child is healthy.
21+ # @parameters message [Hash] Additional details to send with the message.
22+ def healthy! ( **message )
23+ send ( healthy : true , **message )
24+ end
25+
2026 # Notify the parent controller that the child is reloading.
2127 # @parameters message [Hash] Additional details to send with the message.
2228 def reloading! ( **message )
Original file line number Diff line number Diff line change 11# Releases
22
3+ ## Unreleased
4+
5+ - Introduce ` Client#healthy! ` for sending health check messages.
6+
37## v0.28.0
48
59 - Add ` startup_timeout ` parameter to ` spawn ` and ` run ` methods for detecting processes that hang during startup and never become ready.
Original file line number Diff line number Diff line change 5151 end
5252 end
5353
54+ with "#healthy!" do
55+ it "sends healthy message" do
56+ context = server . bind
57+
58+ client . healthy!
59+
60+ message = context . receive
61+
62+ expect ( message ) . to have_keys (
63+ healthy : be == true
64+ )
65+ end
66+
67+ it "sends healthy message with additional details" do
68+ context = server . bind
69+
70+ client . healthy! ( status : "All systems operational" , uptime : 3600 )
71+
72+ message = context . receive
73+
74+ expect ( message ) . to have_keys (
75+ healthy : be == true ,
76+ status : be == "All systems operational" ,
77+ uptime : be == 3600
78+ )
79+ end
80+ end
81+
5482 with "#send" do
5583 it "sends message" do
5684 context = server . bind
You can’t perform that action at this time.
0 commit comments