It is possible for a move event to occur shortly after a directory
is created. These events are not bundled as part of an operation
like "copy", so they should not be suppressed, however the
notification should be emitted after the "create_dir" from its
parent is emitted.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
All of the awaitable calls in the inotify loop only block to
postpone notifications. Only gcode notifications require async
processing due to metadata analysis. Queue these notifications
while allowing inotify events to be received concurrently.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
fix
Most requests do not require waiting for inotify to process the
file event before exiting. Rework the NotifySyncLock to make this
optional. Replace the write mutex with the sync lock itself,
a guarantee that the synchronization state is cleaned up when
a request is complete.
This implementation avoids potential deadlocks or long wait times
when inotify is not enabled on a file system.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Moonraker should only force the state to report as "startup"
when Klippy is connected and it hasn't detected a transition
to startup.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
This method will not work correctly if any individual part contains
a special character. For example, if an item in the path contains
a "#", the regex will return an incorrect result. Likewise, if any item
in a query string contains an "&" the query string will be correctly
escaped.
All urls supplied to the http client must be escaped by the consumer.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
The configured url should already be escaped. It isn't possible to
reliably quote a full url if any of the parts contain special characters.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
The url received from SimplyPrint should already be escaped. It
isn't possibly to reliably quote a full url if any of the parts contain
special characters.
This commit also corrects some minor type checking issues.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Some commands may return codes other than zero on a successful
return. Allow callers to specify an optional list of return codes that
will return success without raising an exception.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
According to the supervisord documentation the `-c` option is used to
specify the configuraiton file.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Allowing only a single part in the regex resulted in repos
without tags being assigned erronous version info. With
this change, the following tags can be parsed:
v1.0
v1.0.2
1.0
1.0.2
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
When converting a semantic version to a list for comparisons
guarantee that the base version has 3 parts.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Allow tags versions with one, two, or three parts. The following
examples are now valid:
v1
v1.3
v1.0,10
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Provide a new websocket implementation that creates a near one to one
bridge with a Unix Socket connection to Klippy. This may be used to
access Klippy APIs not otherwise available over the primary websocket,
such as the various "dump" commands.
Unlike the primary websocket Moonraker does not decode or inspect
data that passes through the bridge.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
This endpoint allows clients to refresh items on an individual basis
when the "name" parameter is specified. This endpoint replaces
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Re-implement pip updates using a pinned version. A version
check is now always done prior to installing python requirements,
updating when necessary.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Parse system packages and python requirements prior to and after each
updating, using the difference to determine if an update is necessary.
Only the new detected packages are installed unless the "force" variable
is set.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Handle a race condition where a shutdown event could be received
from the webhooks subscription during initialization.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
module: Adding OctoEverywhere to the default service list.
Adding OctoEverywhere to the default service list in machine.py so future installs of moonraker will allow the octoeverywhere service to be managed from frontends.
Signed-off-by: Quinn Damerell <quinnd@outlook.com>