toil.utils.toilStatus¶
Tool for reporting on job status.
Attributes¶
Classes¶
Tool for reporting on job status. |
Functions¶
|
Reports the state of a Toil workflow. |
Module Contents¶
- toil.utils.toilStatus.logger¶
- class toil.utils.toilStatus.ToilStatus(jobStoreName, specifiedJobs=None)[source]¶
Tool for reporting on job status.
- jobStoreName¶
- jobStore¶
- message_bus_path¶
- printJobLog()[source]¶
Takes a list of jobs, finds their log files, and prints them to the terminal.
- Return type:
None
- printAggregateJobStats(properties, childNumber)[source]¶
Prints each job’s ID, log file, remaining tries, and other properties.
- report_on_jobs()[source]¶
Gathers information about jobs such as its child jobs and status.
- Returns jobStats:
Dict containing some lists of jobs by category, and some lists of job properties for each job in self.jobsToReport.
- Return type:
Dict[str, Any]
- static getPIDStatus(jobStoreName)[source]¶
Determine the status of a process with a particular local pid.
Checks to see if a process exists or not.
- static getStatus(jobStoreName)[source]¶
Determine the status of a workflow.
If the jobstore does not exist, this returns ‘QUEUED’, assuming it has not been created yet.
Checks for the existence of files created in the toil.Leader.run(). In toil.Leader.run(), if a workflow completes with failed jobs, ‘failed.log’ is created, otherwise ‘succeeded.log’ is written. If neither of these exist, the leader is still running jobs.
- fetchRootJob()[source]¶
Fetches the root job from the jobStore that provides context for all other jobs.
Exactly the same as the jobStore.loadRootJob() function, but with a different exit message if the root job is not found (indicating the workflow ran successfully to completion and certain stats cannot be gathered from it meaningfully such as which jobs are left to run).
- Raises:
JobException – if the root job does not exist.
- Return type:
- fetchUserJobs(jobs)[source]¶
Takes a user input array of jobs, verifies that they are in the jobStore and returns the array of jobsToReport.
- Parameters:
jobs (list) – A list of jobs to be verified.
- Returns jobsToReport:
A list of jobs which are verified to be in the jobStore.
- Return type:
List[toil.job.JobDescription]
- traverseJobGraph(rootJob, jobsToReport=None, foundJobStoreIDs=None)[source]¶
Find all current jobs in the jobStore and return them as an Array.
- Parameters:
rootJob (toil.job.JobDescription) – The root job of the workflow.
jobsToReport (list) – A list of jobNodes to be added to and returned.
foundJobStoreIDs (set) – A set of jobStoreIDs used to keep track of jobStoreIDs encountered in traversal.
- Returns jobsToReport:
The list of jobs currently in the job graph.
- Return type:
List[toil.job.JobDescription]