Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix incorrect Module Reference #1

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/delayed_server.ex
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ defmodule DelayedServer do
- on sup termination: if proc exit takes longer than `options[:shutdown]`, then brutal kill it
(options[:shutdown] is equivalent to the sup child_spec one: :brutal_kill | int_timeout | :infinity)
"""
def start_link(mod,args,options \\ []), do:
def start_link(mod,args,options \\ []), do:
GenServer.start_link(__MODULE__, {mod,args,options})

def init({mod,args,options}) do
Process.flag(:trap_exit, true)
delay = options[:delay] || 100
shutdown = options[:shutdown] || 100
fun = options[:function] || :start_link
name = options[:name] || inspect({mod,fun})
name = options[:name] || inspect({mod,fun,args})
call_timeout = options[:call_timeout] || 5000
Logger.debug("starting #{name} with delay of #{delay}")
started = :erlang.system_time(:milli_seconds)
Expand Down
2 changes: 1 addition & 1 deletion lib/delayed_sup.ex
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ defmodule DelayedSup do
end

def start_child(supervisor, child_spec) do
Supervisor.start_child(supervisor, MiddleSup.map_childspec(child_spec))
Supervisor.start_child(supervisor, DelayedSup.Spec.map_childspec(child_spec))
end

defdelegate [stop(sup),stop(sup,r),stop(sup,r,t), count_children(sup), terminate_child(sup,child),
Expand Down