Arksine / moonraker

Web API Server for Klipper
https://moonraker.readthedocs.io
GNU General Public License v3.0
1.05k stars 406 forks source link

Queue should be paused when non-queued file is finished printing #874

Closed AndreKR closed 1 month ago

AndreKR commented 3 months ago

What happened

The documentation for the [job_queue] automatic_transition setting says:

When False the queue will be paused after each job is loaded, requiring that users manually resume to load the next print.

This currently doesn't happen if the currently printing file didn't come from the queue.

Client

Fluidd

Browser

Chrome

How to reproduce

Expected result: After the currently printing file is printed, the queue should be paused, so that I can start the next print with Resume.

Actual result: The queue stays resumed, so in order to print the next file I first have to click Pause and only then I can print the next file using Resume.

Additional information

No response

Arksine commented 3 months ago

I'm unable to reproduce in my testing using Postman. When adding an item to an empty queue while Klipper is printing Moonraker's internal queue state is correctly set to paused and reflected as such by the /server/job_queue/status endpoint.

From your description, it sounds like this may be an issue with the UI/Frontend. That is, the frontend seems to set its internal state to ready, regardless of the state reported by Moonraker.

AndreKR commented 3 months ago

Hm, interesting, I can no longer reproduce this, or rather I cannot even resume the queue at all while a print is running, which I guess is the desired behavior? Previously I was able to freely switch between paused and resumed while a print was running.

AndreKR commented 3 months ago

I was able to reproduce it again. There was an important step missing from my reproduction instructions, the first print has to be started via the queue for the problem to show up.

Arksine commented 2 months ago

Sorry for the delay. I was able to reproduce using the method you outlined above. Commit dc00d38b01915b9aea736999df9287b2846dd6bf should resolve this.

Arksine commented 1 month ago

As there has been no further feedback, I'm going to close this as resolved.