Skip to content

Commit b2a4278

Browse files
committed
Add reload recipe.
1 parent 3932e46 commit b2a4278

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

bake/async/container/supervisor.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,20 @@ def initialize(...)
99
require "async/container/supervisor"
1010
end
1111

12+
# Restart the container, typically causing it to exit (the parent process should then restart it).
1213
def restart
1314
client do |connection|
1415
connection.call(do: :restart)
1516
end
1617
end
1718

19+
# Reload the services gracefully, allowing them to reconfigure without dropping connections.
20+
def reload
21+
client do |connection|
22+
connection.call(do: :restart, signal: :HUP)
23+
end
24+
end
25+
1826
def status
1927
client do |connection|
2028
connection.call(do: :status)

releases.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Releases
22

3+
## Unreleased
4+
5+
- Add `async:container:supervisor:reload` command to restart the container (blue/green deployment).
6+
37
## v0.1.0
48

59
- Initial implementation.

0 commit comments

Comments
 (0)