Update command_runner to not use entire scheduler
parent
2f689e4a1f
commit
e5d1e00c5f
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue