Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

*Feature Request - command to check job queue #2062

Closed
Wetzel402 opened this issue Dec 1, 2024 · 2 comments
Closed

*Feature Request - command to check job queue #2062

Wetzel402 opened this issue Dec 1, 2024 · 2 comments
Labels
💡 Type: FR Requests a new feature

Comments

@Wetzel402
Copy link

Requested feature:

Add a command that returns job queue length

Solves the following problem:

Allows for macros to take the job queue into account.

Example: END_PRINT could check the job queue length and if it returns 0 continue shutdown but if it returns >0 it pauses so the bed can be cleared and the user can resume.

Additional information:

No response

@Wetzel402 Wetzel402 added the 💡 Type: FR Requests a new feature label Dec 1, 2024
@meteyou
Copy link
Member

meteyou commented Dec 1, 2024

Mainsail is only a Webinterface. if you close your browser, Mainsail is not running. So this feature cannot be added to Mainsail.

Every Command or Gcode is implemented in Klipper. So you have to add a macro in your Klipper config. But there is one problem. The jobqueue itself is a Moonraker feature. So I dont think you have access to the Moonraker jobqueue length. You can only start a shutdown with a delay and cancel it with the next print start. so it will only be executed, when no print is started. If you need help to set it up, feel free to use our discord. This is not the place for help itself.

@meteyou meteyou closed this as not planned Won't fix, can't repro, duplicate, stale Dec 1, 2024
@Wetzel402
Copy link
Author

For the record here is my test example gcode...

[delayed_gcode POWER_DOWN]
gcode:
  POWER_OFF_PRINTER

[gcode_macro CONTINUE]
gcode:
  UPDATE_DELAYED_GCODE ID=POWER_DOWN DURATION=0.1
  RESPOND type="command" msg="action:prompt_end"
  
[gcode_macro CANCEL]
gcode:
  UPDATE_DELAYED_GCODE ID=POWER_DOWN DURATION=0
  RESPOND type="command" msg="action:prompt_end"

[gcode_macro SHOW_PROMT]
gcode:
  UPDATE_DELAYED_GCODE ID=POWER_DOWN DURATION=60
  RESPOND TYPE=command MSG="action:prompt_begin Shutdown"
  RESPOND TYPE=command MSG="action:prompt_text Printer shutting down. Cancel?"
  RESPOND TYPE=command MSG="action:prompt_footer_button continue|CONTINUE|primary"
  RESPOND TYPE=command MSG="action:prompt_footer_button CANCEL|CANCEL|error"
  RESPOND TYPE=command MSG="action:prompt_show"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💡 Type: FR Requests a new feature
Projects
None yet
Development

No branches or pull requests

2 participants