Skip to content

Commit

Permalink
raise exception on set_job_status() if redis set fails
Browse files Browse the repository at this point in the history
  • Loading branch information
onewland committed Oct 1, 2024
1 parent 8cc8ca0 commit 5cce7a1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion snuba/manual_jobs/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ def _release_job_lock(job_id: str) -> None:


def _set_job_status(job_id: str, status: JobStatus) -> JobStatus:
_redis_client.set(name=_build_job_status_key(job_id), value=status.value)
if not _redis_client.set(name=_build_job_status_key(job_id), value=status.value):
raise SerializableException(f"Failed to set job status {status} on {job_id}")
return status


Expand Down

0 comments on commit 5cce7a1

Please sign in to comment.