Decrease the frequency of auto updates roughly every 24 hours. The manager will attempt to update once between 12am and 4am.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
This is a workaround for an issue where the http client fails to propogate an exception back to the caller, hanging the update process.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Attach "is_complete" to the response so clients know that the transaction is done, even though it resulted in an error.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
The entire configuration should be validated prior to device initialization. In the event of an error, the GPIO Chip factory must be closed.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
We need to be sure that the entire update_manager is correctly configured prior to queueing the callbacks for the initial refresh. Rather than have each updater spawn a "refesh" callback, move them all into a single init method spawned after the module has been fully configured.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
The server can still operate and be used to fetch the logs if a plugin fails to load. Add a 'failed_plugins' field to the /server/info response so clients can notify users that this plugin failed to load.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Previously this check was only on done when a directory was requested by the API. Moving this check to _list_directory ()updates metadata for internal calls as well.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
The slower system package update will now only executed by the auto-refresh routine. Moonraker will check for updates roughly every 2 hours, however system packages updates will only occur between 1am and 4am local time.
If a print is in progress any attempt to refresh or update will be aborted.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
This should reduce the load on low perfomance devices. This also makes it possible to queue update requests.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Calls to "refresh" should not be allowed to occur while a client a current refresh is in progress. Updates will wait for a pending refresh to complete before beginning the update procedure.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
It is possible for the log files to be registered after a rollover, which can result in the file not existing. Force the log endpoints to register, bypassing the existance check.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Instead make sure that the supplied path is not the system root and check that moonraker has the appropriate privileges to access the directory.
Also track visited directories when retreiving a full file list to prevent infinite recursion.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>