From 00664fa8629c5713d2ec676410a11dadc83d6632 Mon Sep 17 00:00:00 2001 From: Ian Grant <ian.conway.grant@gmail.com> Date: Thu, 15 May 2025 17:07:16 -0400 Subject: [PATCH] fix: added method to get a single job's status in JobLedger --- maap_utils/JobLedger.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/maap_utils/JobLedger.py b/maap_utils/JobLedger.py index e6c82e5..a3a14d1 100644 --- a/maap_utils/JobLedger.py +++ b/maap_utils/JobLedger.py @@ -35,6 +35,10 @@ class JobLedger: self.last_checked[job_id] = datetime.now() self.attempts[job_id] += 1 + def get_status(self, job_id: str) -> str: + """Get the status of a specific job""" + return self.status.get(job_id, "Unknown") + def get_pending_jobs(self) -> List[Job]: """Get jobs not in final states""" -- GitLab