Updates the information for a specific job in a thread-safe manner.
(self, job_id: str, **kwargs)
| 86 | return job_id |
| 87 | |
| 88 | def update_job(self, job_id: str, **kwargs): |
| 89 | """Updates the information for a specific job in a thread-safe manner.""" |
| 90 | with self.lock: |
| 91 | if job_id in self.jobs: |
| 92 | job = self.jobs[job_id] |
| 93 | for key, value in kwargs.items(): |
| 94 | if hasattr(job, key): |
| 95 | setattr(job, key, value) |
| 96 | |
| 97 | def get_job(self, job_id: str) -> Optional[JobInfo]: |
| 98 | """Retrieves the information for a single job.""" |