Added additional essential metdata for single extruder multi-material printing. This is critical to new Mainsail functionality to map tools to MMU spools when using Happy Hare (Klipper MMU driver)
Signed-off-by: Paul Morgan (moggieuk@hotmail.com)
The addition of "gcode file processors" makes it possible
for processor registration to occur in "component_init".
The file observer init must be delayed until after all processors
are registered to correctly process metadata for gcode files
added while Moonraker was not running.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
It is possible to create, move, then close a file. Handle this case
by rescheduling the "create_file" event under the new name.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Allow components to register gcode processors which will modify
the gcode file prior to metadata processing.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Add an exc_info parameter that optionally takes an
exception that is passed to the logging function. This
will log the traceback without an additional logging call.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
When possible record the name of the user that requested the
job. The klippy_api's component now takes an optional user
argument in its "start_print" method. This user is broadcast
in an event after a print request successfully returns.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Some installations, such as those in public areas, may wish disallow
changes to the configuration.
This option defaults to True, so no change in behavior is introduced.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
It is desirable to use templates (and therefore secrets) in
the server's configuration options. We need to defer loading
the "file_manager", remove its dependency from secrets. When
the file_manager is loaded it will look up "secrets" and register
the file path as reserved.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Some installations do not have Klipper's configuration
in the data path's "config" folder. Provide a way to
opt out of this check.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Use EAFP techniques to test for directory read permission
during registration. If access fails continue with registration.
This allows users to potentially fix an issue without restarting.
Inotify failures always require a restart to resolve.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Introduce placeholders for the regex capture groups.
This reduces the length of the original pattern and
makes it easy to change the pattern for a return value
if necessary.
This change modifies the float pattern to accept any
float or integer.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Correction of the regex (Replacing the = with one: and adding the filament index for the regex to work).
Signed-off-by: Emmanuel WALDNER emmanuel.waldner@gmail.com
If the user creates or moves a folder that was is reserved
reserved correctly ignore or remove watches as appropriate.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Desktop class PCs may exit the request before the inotify observer
gains control of the loop. When the observer does gain control
it will immediately notify as the sync mutex is no longer held,
this can result in sending the websocket notification before
the response has returned. Delay all notifications by 5ms to prevent
this.
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>