The copy methods are blocking and will block the asyncio event loop. Run them in a ThreadPoolExecutor to keep the event loop free.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
When a directory is deleted this attempts to suppress delete events for all children. Clients only need to be notified of the parent node, as its deletion implies all children have been deleted.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
The previously deprecated "data" field has now been removed. The "size" field now reports the size of the png. Clients may use the "relative_path" field to retrieve thumbnail png files.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
This guarantees that .ufps will not be unzipped in parallel and offloads a potential blocking operation to another process.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
This removes all calls to "notify_filelist_changed" in the FileManager class. This also simplfies the previous `_convert_path()` method, as it is no longer necessary to return the path relative to the root.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Generally speaking static files do not require authorization, so there should be little harm in bypassing auth checks. This allows clients to retrieve assets without XHRs or requesting tokens.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
On some devices gpiod does not report the correct state. Since Moonraker maintains exclusive control over GPIO lines, its unnecessary to query the line itself for state, as we can maintain it ourselves.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
This should allow git's internal timeout mechanisms to trigger at the expense of potentially delaying response time if a fetch or pull hangs.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
It is now possible for any authorized request to delete a user, however a logged in user cannot delete its own account.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Add documentation for the "/access/users/list" endpoint. Document the "notify_user_created" and "notify_user_deleted" websocket notifications.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
A single endpoint that can be used to both toggle and retrieve device state is useful for interoperability with home automation software. The previous endpoints will remain as they are still useful for batch operations.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Make sure that the current device state is correct in the event that a device is toggled by an external source.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Always run git fsck when initializing a repo. If a loose object error is detected when running git pull or git fetch, attempt to remove loose objects and retry.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
The intial test uses the python-lint action to validate code style
according to the preferences used for Python code in the Moonraker
repo.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Document the "cpu_temp" field in the "/machine/proc_stats" request along with the new "notify_proc_stat_update" websocket notification.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>