Update command_runner to not use entire scheduler

pull/713/head
Connor Rigby 2019-05-17 08:59:21 -07:00 committed by Connor Rigby
parent 2f689e4a1f
commit e5d1e00c5f
2 changed files with 3 additions and 3 deletions

View File

@ -102,7 +102,7 @@ defmodule FarmbotCeleryScript.Scheduler do
@impl true
def handle_info(:checkup, state) do
# execute_steps = :ets.select(state.table, fn
# execute_steps = :ets.select(state.table, fn
# {head, from, compiled} when is_number(head) -> {head, from, compiled}
# end)
execute_steps =
@ -131,7 +131,7 @@ defmodule FarmbotCeleryScript.Scheduler do
true = :ets.delete_object(state.table, step)
end
send(self(), :checkup)
Process.send_after(self(), :checkup, 1000)
{:noreply, state}
end
end

View File

@ -35,7 +35,7 @@ defmodule FarmbotCeleryScript.Scheduler.CommandRunner do
def handle_continue([], state) do
# IO.puts "[#{inspect(self())}] CommandRunner complete"
send(self(), :checkup)
Process.send_after(self(), :checkup, 500)
{:noreply, state}
end