Skip to content

Commit

Permalink
Cast job_id to str to conform with type of _jobs_cache
Browse files Browse the repository at this point in the history
  • Loading branch information
unkcpz committed Jul 22, 2024
1 parent 9c26ce7 commit 0d2c91b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/aiida/engine/processes/calcjobs/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ async def _update_job_info(self) -> None:
else:
for job_id, future in self._job_update_requests.items():
if not future.done():
future.set_result(self._jobs_cache.get(job_id, None))
future.set_result(self._jobs_cache.get(str(job_id), None))
finally:
self._job_update_requests = {}

Expand Down Expand Up @@ -235,13 +235,13 @@ def _get_next_update_delay(self) -> float:
def _update_requests_outstanding(self) -> bool:
return any(not request.done() for request in self._job_update_requests.values())

def _get_jobs_with_scheduler(self) -> List[str]:
def _get_jobs_with_scheduler(self) -> List[Hashable]:
"""Get all the jobs that are currently with scheduler.
:return: the list of jobs with the scheduler
:rtype: list
"""
return [str(job_id) for job_id, _ in self._job_update_requests.items()]
return [job_id for job_id, _ in self._job_update_requests.items()]


class JobManager:
Expand Down

0 comments on commit 0d2c91b

Please sign in to comment.