feat(ticketing): add job statuses + wait_until_complete helper#103
Merged
Conversation
Adds JobStatusApiClient + JobStatusesService exposing the Zendesk
job-statuses endpoints plus a poll-until-terminal helper for callers
doing bulk updates.
- list paginates /api/v2/job_statuses
- get /api/v2/job_statuses/{id}
- show_many via ?ids=a,b,c
- wait_until_complete polls .get until status is completed/failed/killed
(injectable sleep + now for testing) and raises JobStatusTimeout when
the deadline elapses
Reuses the shared JobStatus value object.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
52 tasks
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
JobStatusApiClient+JobStatusesServicecovering Zendesk job-statuses:list,get,show_many(via?ids=a,b).wait_until_complete(job_id, interval, timeout)polling helper that loops on.getuntil the job reaches a terminal state (completed,failed,killed) or raisesJobStatusTimeout.sleepandnoware injectable for deterministic testing.JobStatusvalue object — no new domain model needed.self.job_statusesonto theTicketingfacade.Test plan
tests/unit/ticketing/test_job_status_client.py— paths, show_many list/null/missing handling, error propagationtests/unit/ticketing/test_job_statuses_service.py— delegation, poll-until-terminal, timeout, injected sleep/now, all three terminal statestests/integration/ticketing/test_job_statuses.py(list, NotFound for bogus id, wait_until_complete on an already-finished job)Part of #79 (Batch 2 — job statuses).
🤖 Generated with Claude Code