This is preferable to setting the WorkingDirectory item in
the systemd unit, as its possible to switch between git repos
and installed wheels without requiring root.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
If the "moonraker" entry point is available use it as an executable. Otherwise
launch the module through the "-m" switch.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Moonraker no longer uses the curl http client backend. The curl
commandline client is still used in some scripts and thus has been
retained.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
The tests are stale and will not run successfully against the current
code. This will be addressed in a future series of patches.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Support manual scan requests for systems where inotify
does not function correctlly (network shares). This endpoint
may also be used to force a rescan of files that have already
had an initial scan.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Previously Moonraker disabled writing to symbolic links, as
doing so would overwrite the link. Moonraker now resolves
the link, overwrites the file, and manually emits a websocket
notification.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Schedule fallback websocket notifications in the event that
inotify is unable to watch a file system.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Treat these events as if they were actual file write events. They
will reset the node completion time and suppress the notifcation.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
This feature implements a sensor component that can be used to
track/log generic sensors from multiple sources. Each sensor
can have properties like unit of measurement, accuracy and a
display name that help frontends display the tracked measurements.
Signed-off-by: Morton Jonuschat <mjonuschat+moonraker@gmail.com>
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>