Update bootup sequence logs

feature/sequence-on-boot
connor rigby 2019-11-07 14:33:25 -08:00 committed by Connor Rigby
parent 503e62507e
commit f23eb81616
No known key found for this signature in database
GPG Key ID: 29A88B24B70456E0
2 changed files with 9 additions and 1 deletions

View File

@ -286,6 +286,9 @@ defimpl FarmbotCore.AssetWorker, for: FarmbotCore.Asset.FbosConfig do
{:sequence_init_log, bool} ->
FarmbotCore.Logger.success 1, "Set sequence init log messages to #{bool}"
{:boot_sequence_id, nil} ->
FarmbotCore.Logger.success 1, "Set bootup sequence to none"
{:boot_sequence_id, id} ->
case Asset.get_sequence(id) do
%{name: name} ->

View File

@ -42,7 +42,12 @@ defmodule FarmbotOS.BootupSequenceWorker do
def handle_info(:start_sequence, %{sequence_id: id} = state) do
case Asset.get_sequence(id) do
nil ->
{:stop, "could not find bootup sequence by id: #{inspect(id)}"}
FarmbotCore.Logger.error(1, """
Farmbot could not execute it's configured bootup sequence. Maybe
a sync is required?
""")
{:noreply, state}
%{name: name} ->
Logger.debug("bootup sequence start: #{inspect(state)}")