Skip to content

Commit

Permalink
Merge pull request #13 from SmartColumbusOS/stop_more
Browse files Browse the repository at this point in the history
Stop more
  • Loading branch information
bbalser authored Mar 21, 2019
2 parents c1d47a1 + 25cf940 commit b4a858b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ by adding `divo` to your list of dependencies in `mix.exs`:
```elixir
def deps do
[

{:divo, "~> 1.0.0", only: [:dev, :integration], organization: "smartcolumbus_os"}
{:divo, "~> 1.0.1", only: [:dev, :integration], organization: "smartcolumbus_os"}
]
end
```
Expand Down
8 changes: 7 additions & 1 deletion lib/divo.ex
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,13 @@ defmodule Divo do
if unquote(auto_start), do: Application.ensure_all_started(app)

on_exit(fn ->
if unquote(auto_start), do: Application.stop(app)
if unquote(auto_start) do
dependent_apps =
Application.spec(app, :applications) -- [:kernel, :stdlib, :elixir, :ex_unit, :logger, :divo]

[app | dependent_apps]
|> Enum.each(&Application.stop/1)
end

Divo.Compose.kill()
end)
Expand Down
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ defmodule Divo.MixProject do
def project do
[
app: :divo,
version: "1.0.0",
version: "1.0.1",
elixir: "~> 1.7",
start_permanent: Mix.env() == :prod,
deps: deps(),
Expand Down

0 comments on commit b4a858b

Please sign in to comment.