Skip to content

Commit

Permalink
Added getJobResultMap and getJobPreciousResults
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewssobral committed May 15, 2024
1 parent 67174db commit 8e70c2a
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions proactive/ProactiveGateway.py
Original file line number Diff line number Diff line change
Expand Up @@ -586,6 +586,26 @@ def getJobResult(self, job_id, timeout=60000):
all_results.append(str(result.getValue()))
return os.linesep.join(v for v in all_results)

def getJobResultMap(self, job_id, timeout=60000):
"""
Retrieves the resultMap of a completed job.
:param job_id: The ID of the job to fetch the result for.
:param timeout: The timeout in milliseconds for waiting for the job to finish.
:return: The result of the job if available within the timeout period.
"""
return self.proactive_scheduler_client.waitForJob(job_id, timeout).getResultMap()

def getJobPreciousResults(self, job_id, timeout=60000):
"""
Retrieves the precious results of a completed job.
:param job_id: The ID of the job to fetch the result for.
:param timeout: The timeout in milliseconds for waiting for the job to finish.
:return: The result of the job if available within the timeout period.
"""
return self.proactive_scheduler_client.waitForJob(job_id, timeout).getPreciousResults()

def getTaskResult(self, job_id, task_name, timeout=60000):
"""
Retrieves the result of a specified task from a job.
Expand Down

0 comments on commit 8e70c2a

Please sign in to comment.