Don't pass args to Watcher
This commit is contained in:
@@ -8,7 +8,7 @@ defmodule ElixirKoans do
|
||||
worker(Display, []),
|
||||
worker(Tracker, []),
|
||||
worker(Runner, []),
|
||||
worker(Watcher, [[]])
|
||||
worker(Watcher, [])
|
||||
]
|
||||
|
||||
opts = [strategy: :one_for_one, name: ElixirKoans.Supervisor]
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
defmodule Watcher do
|
||||
use GenServer
|
||||
|
||||
def start_link(args) do
|
||||
GenServer.start_link(__MODULE__, args)
|
||||
def start_link() do
|
||||
GenServer.start_link(__MODULE__, [dirs: ["lib/koans"]])
|
||||
end
|
||||
|
||||
def init(args) do
|
||||
{:ok, watcher_pid} = FileSystem.start_link(dirs: ["lib/koans"])
|
||||
{:ok, watcher_pid} = FileSystem.start_link(args)
|
||||
FileSystem.subscribe(watcher_pid)
|
||||
{:ok, %{watcher_pid: watcher_pid}}
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user