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