Skip to content

Commit

Permalink
fixed wrong arg reference for starting stopped spiders
Browse files Browse the repository at this point in the history
  • Loading branch information
Ziinc committed Nov 2, 2020
1 parent 90fa9ba commit 13b2bda
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/crawly/engine.ex
Original file line number Diff line number Diff line change
Expand Up @@ -168,11 +168,11 @@ defmodule Crawly.Engine do

# start all stopped spiders
new_started_spiders =
Enum.reduce(stopped, state.started_spiders, fn info, acc ->
Crawly.EngineSup.start_spider(info.name)
Enum.reduce(stopped, state.started_spiders, fn s, acc ->
Crawly.EngineSup.start_spider(s)
|> case do
{:ok, pid} ->
Map.put(acc, info.name, pid)
Map.put(acc, s, pid)

_ ->
acc
Expand Down

0 comments on commit 13b2bda

Please sign in to comment.