Honor print job copies - #255
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| break | ||
| db_store.update_print_job_status(job_id=job_id, status="running") | ||
| try: | ||
| target.send(payload) | ||
| for _ in range(copies): | ||
| target.send(payload) |
There was a problem hiding this comment.
Avoid resending already printed copies after retry
Within each retry attempt all requested copies are sent in one loop; if target.send raises after printing some copies, the except block triggers a retry of the entire loop on the next attempt, causing more copies to be printed than requested whenever a transient failure happens mid‑batch. This overprints labels for multi‑copy jobs; consider tracking remaining copies or aborting without reissuing copies already sent.
Useful? React with 👍 / 👎.
Summary
Testing
Codex Task