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 ce3b1ee
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/aiida/engine/processes/calcjobs/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ async def _get_jobs_from_scheduler(self) -> Dict[Hashable, 'JobInfo']:
self.logger.info(f'AuthInfo<{self._authinfo.pk}>: successfully retrieved status of active jobs')

for job_id, job_info in scheduler_response.items():
jobs_cache[job_id] = job_info
jobs_cache[str(job_id)] = job_info

return jobs_cache

Expand Down 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

0 comments on commit ce3b1ee

Please sign in to comment.