toil.exceptions¶
Neutral place for exceptions, to break import cycles.
Attributes¶
Exceptions¶
Common base class for all non-exit exceptions. |
Classes¶
A thread to aggregate statistics and logging. |
Module Contents¶
- class toil.exceptions.StatsAndLogging(jobStore, config)[source]¶
A thread to aggregate statistics and logging.
- Parameters:
config (toil.common.Config)
- classmethod formatLogStream(stream, stream_name)[source]¶
Given a stream of text or bytes, and the job name, job itself, or some other optional stringifyable identity info for the job, return a big text string with the formatted job log, suitable for printing for the user.
We don’t want to prefix every line of the job’s log with our own logging info, or we get prefixes wider than any reasonable terminal and longer than the messages.
- classmethod writeLogFiles(jobNames, jobLogList, config, failed=False)[source]¶
- Parameters:
jobNames (List[str])
jobLogList (List[str])
config (toil.common.Config)
failed (bool)
- Return type:
None
- classmethod statsAndLoggingAggregator(jobStore, stop, config)[source]¶
The following function is used for collating stats/reporting log messages from the workers. Works inside of a thread, collates as long as the stop flag is not True.
- Parameters:
stop (threading.Event)
config (toil.common.Config)
- Return type:
None
- toil.exceptions.logger¶
- exception toil.exceptions.FailedJobsException(job_store, failed_jobs, exit_code=1)[source]¶
Bases:
ExceptionCommon base class for all non-exit exceptions.
- Parameters:
job_store (toil.jobStores.abstractJobStore.AbstractJobStore)
failed_jobs (List[toil.job.JobDescription])
exit_code (int)