Allow default metadata parser timeout to be configurable #862
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi, I'm the author of Happy Hare - a MMU extension to Klipper. Happy Hare adds a couple of pieces of functionality to Moonraker, one of which extends the metadata parsing to find and substitute placeholders in the gcode. E.g. to assess the set of Tools used in a multi-color print. The issue is that this adds a little extra processing time and the hard coded default of 10s is insufficient. (I know that if "object processing" is enabled the default jumps to 300s which is a current workaround).
This PR adds the ability to optionally specify the default (minimum) timeout using an extra optional parameters under file_manager:
Which replaces the old default if specified. This can also be used to push object_processing timeout higher if really necessary...
Finally, I increased the code default to 20s because it seems to make more sense in my testing for large gcode files even without the added Happy Hare option. This could remain 10 with the exposed config if necessary.
Side note: If the metadata parsing does fail, then there are bugs in other tools like KlipperScreen (I have a PR to fix as well) that will cause massive amount of errors being written to syslog which will usually lead to Timer to Close errors with Klipper.