Skip to content

Commit

Permalink
Add support for graceful restart.
Browse files Browse the repository at this point in the history
  • Loading branch information
ioquatix committed Mar 28, 2024
1 parent 58e7446 commit d86b128
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/falcon/command/serve.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class Serve < Samovar::Command
end

def container_options
@options.slice(:count, :forks, :threads)
@options.slice(:count, :forks, :threads).merge(restart: true)
end

def endpoint_options
Expand Down Expand Up @@ -116,7 +116,7 @@ def call
buffer.puts "- To reload configuration: kill -HUP #{Process.pid}"
end

Async::Service::Controller.run(self.configuration, container_class: self.container_class)
Async::Service::Controller.run(self.configuration, container_class: self.container_class, graceful_stop: 10)
end
end
end
Expand Down

0 comments on commit d86b128

Please sign in to comment.