pyslurmutils.client.job_io.file_io.Future#
- class pyslurmutils.client.job_io.file_io.Future(job_id, filename, client=None)[source]#
Bases:
Future
- Parameters:
job_id (
int
) –filename (
str
) –
- cancel()[source]#
Cancel the future if possible. The SLURM job is not affected.
Returns True if the future was cancelled, False otherwise. A future cannot be cancelled if it is running or has already completed.
- Return type:
bool
- property client#
- done()[source]#
Return True if the future was cancelled or finished executing.
- Return type:
Optional
[bool
]
- exception(timeout=None)[source]#
Waits for the result indefinitely by default.
- Raises:
CancelledError: If the future was cancelled. TimeoutError: If the future didn’t finish executing before the given
timeout.
- Parameters:
timeout (
Optional
[Number
]) –- Return type:
Optional
[Exception
]
- result(timeout=None)[source]#
Waits for the result indefinitely by default.
- Raises:
CancelledError: If the future was cancelled. TimeoutError: If the future didn’t finish executing before the given
timeout.
Exception: the exception raised by the job
- Parameters:
timeout (
Optional
[Number
]) –- Return type:
Any