Skip to content

Commit

Permalink
Terminate gracefully during SIGTERM (#379)
Browse files Browse the repository at this point in the history
Signed-off-by: Kevin Hoffman <[email protected]>
  • Loading branch information
autodidaddict authored Apr 12, 2022
1 parent 344372b commit 46011fd
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions host_core/lib/host_core/host.ex
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,9 @@ defmodule HostCore.Host do
def terminate(reason, state) do
Logger.debug("Host termination requested: #{inspect(reason)}", reason: reason)
publish_host_stopped(state.labels)
purge()
:timer.sleep(300)
:init.stop()
end

defp get_env_host_labels() do
Expand Down
2 changes: 1 addition & 1 deletion host_core/mix.exs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
defmodule HostCore.MixProject do
use Mix.Project

@app_vsn "0.54.1"
@app_vsn "0.54.2"

def project do
[
Expand Down
2 changes: 1 addition & 1 deletion wasmcloud_host/mix.exs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
defmodule WasmcloudHost.MixProject do
use Mix.Project

@app_vsn "0.54.1"
@app_vsn "0.54.2"

def project do
[
Expand Down

0 comments on commit 46011fd

Please sign in to comment.