Packages

Gracefully stop the system after running shutdown hooks. Also catches SIGTERM.

Current section

Files

Jump to
graceful_stop lib graceful_stop application.ex
Raw

lib/graceful_stop/application.ex

defmodule GracefulStop.Application do
use Application
alias GracefulStop.Handler
def start(_type, _args) do
children = [Handler]
opts = [strategy: :one_for_one, name: GracefulStop.Supervisor]
Supervisor.start_link(children, opts)
end
end