Skip to content

Commit

Permalink
kind of works
Browse files Browse the repository at this point in the history
  • Loading branch information
m1dnight committed Jun 5, 2018
1 parent 8aa7add commit 54acb91
Show file tree
Hide file tree
Showing 11 changed files with 188 additions and 169 deletions.
2 changes: 1 addition & 1 deletion config/config.exs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
use Mix.Config

config :logger, level:
:error
:info

# This configuration is loaded before any dependency and is restricted
# to this project. If another project depends on this project, this
Expand Down
10 changes: 5 additions & 5 deletions lib/behavior/gen_observable.ex
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,10 @@ defmodule Observables.GenObservable do
state.listeningto
|> Enum.filter(fn sub -> sub != pid end)

if count(new_subs) == 0 do
Logger.warn("#{inspect(self())} all dependencies done, stopping ourselves.")
cast(self(), :stop)
end
# if count(new_subs) == 0 do
# Logger.warn("#{inspect(self())} all dependencies done, stopping ourselves.")
# cast(self(), :stop)
# end

{:noreply, %{state | listeningto: new_subs}}
end
Expand Down Expand Up @@ -249,7 +249,7 @@ defmodule Observables.GenObservable do
Makes an observable stop and gracefully shut down.
"""
def stop(producer, reason \\ :normal) do
#cast(producer, {:stop, reason})
# cast(producer, {:stop, reason})
cast(producer, :stop)
end

Expand Down
Loading

0 comments on commit 54acb91

Please sign in to comment.