Add continue_job() to complete job lifecycle control#156
Merged
Conversation
e76ef56 to
9c6e54e
Compare
The API supports pausing, resuming, cancelling and continuing jobs (the latter after a timelapse capture), but only the first three were exposed. Adds the missing continue_job(jobId) method. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
9c6e54e to
87508b1
Compare
agners
approved these changes
Apr 28, 2026
| pass | ||
|
|
||
| async def continue_job(self, jobId: int) -> None: | ||
| """Continue a job after a timelapse capture.""" |
Contributor
There was a problem hiding this comment.
I'd guess this also works for M600 (color change) etc? Either way, this wording is also used in OpenAPI, so I am fine with it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
The PrusaLink API exposes four job-control endpoints, but only three were implemented:
cancel_job()DELETE /api/v1/job/{id}pause_job()PUT /api/v1/job/{id}/pauseresume_job()PUT /api/v1/job/{id}/resumecontinue_job()PUT /api/v1/job/{id}/continuecontinue_job()is needed to resume printing after a timelapse snapshot is captured. Without it, a timelapse-enabled print job cannot be unblocked programmatically.This is the third PR in a series of improvements to pyprusalink and the Home Assistant
prusalinkintegration (#154, #155).Changes
pyprusalink/__init__.py: addscontinue_job(jobId: int) -> Nonetests/test_prusalink.py: addstest_continue_jobTest plan
pytest tests/ -v— 16 passedflake8 pyprusalink tests— no errorsblack --check pyprusalink tests— no reformats neededisort --check pyprusalink tests— no changes needed🤖 Generated with Claude Code