Skip to content

Commit

Permalink
Allow getting of an existing job
Browse files Browse the repository at this point in the history
  • Loading branch information
rowleya committed Jul 22, 2024
1 parent 5168c5a commit 7ff6676
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions spinnman/spalloc/spalloc_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,16 @@ def __init__(
self.__nmpi_user = nmpi_user
logger.info("established session to {} for {}", service_url, username)

def get_job(self, job_id: str) -> SpallocJob:
"""
Get a job by its job id.
:param str job_id: The job id.
:rtype: SpallocJob
"""
return _SpallocJob(
self.__session, fix_url(f"{self.__jobs_url}/{job_id}"))

@staticmethod
def open_job_from_database(
service_url, job_url, cookies, headers) -> SpallocJob:
Expand Down

0 comments on commit 7ff6676

Please sign in to comment.