This allows protected namespaces to be modified externally. This is for dev use only, modifying protected namespaces can potentially corrupt the database.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
This fixes a bug where it is protected namespace can be modified in an optional component if that component is disabled.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
add a check and handle consequently in case tasmota device is only one relay and would return a power value when asked a power1 value
Signed-off-by: Arnaud Schaer <arnaud.schaer@wanadoo.fr>
The Klipper repo always initializes last. Send a notification at this time, so if any clients are connected they can receive the full update status after init.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
During normal updates dependencies will always been updated when necessary. It is possible to force a dependency updating using the new "/machine/update/recover" endpoint.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Gives callers flexibility as to which signal is used to cancel a command first. By default shell_command will start with SIGTERM, then proceed to SIGKILL.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Rather than attempt to automate recovery, provide an endpoint for clients
to initiate. Clients can choose between a "hard" recovery, which removes
a corrupt repo and restores from a backup, or a "soft" recover which attempts
a git clean followed by a git reset.
Backups are now only taken when a valid repo is detected.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Note that this does not replace references to "Cura" or "Octoprint" plugins, which are also included in this module.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
It isn't necessary for each updater to have their own init lock. Combine them all into a single Event that is set after the "initialize_updaters" method completes.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Give more time for a standard command to complete. This may help prevent a git command from being terminated prematurely.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Git repos can occasionally become corrupted when attempting to deploy updates thought automated means. Use rysnc to create a backup of each git repo, allowing the repo to be restored in the event of a corrupted repo.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Since "run_with_response" now raises an exception there is no need to inspect the response for a None type. Instead the exception can be handled by the caller directly.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
This error contains the return code and anything received from stdout and stderr when "run_with_response" encounters an error. This allows the caller to receive the output and easily distinguish between a successfully run command and an erronous command.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>