toil.worker¶
Attributes¶
Classes¶
Subclass of MagicExpando for type-checking purposes. |
Functions¶
|
Returns the next chainable job's JobDescription after the given predecessor |
|
Worker process script, runs a job. |
|
Parse command-line arguments to the worker. |
|
Unpickle and enter all the pickled, base64-encoded context managers in the |
|
Module Contents¶
- toil.worker.logger¶
- class toil.worker.StatsDict(*args, **kwargs)[source]¶
Bases:
toil.lib.expando.MagicExpando
Subclass of MagicExpando for type-checking purposes.
- toil.worker.nextChainable(predecessor, job_store, config)[source]¶
Returns the next chainable job’s JobDescription after the given predecessor JobDescription, if one exists, or None if the chain must terminate.
- Parameters:
predecessor (toil.job.JobDescription) – The job to chain from
job_store (toil.jobStores.abstractJobStore.AbstractJobStore) – The JobStore to fetch JobDescriptions from.
config (toil.common.Config) – The configuration for the current run.
- Return type:
Optional[toil.job.JobDescription]
- toil.worker.workerScript(job_store, config, job_name, job_store_id, redirect_output_to_log_file=True, local_worker_temp_dir=None, debug_flags=None)[source]¶
Worker process script, runs a job.
- Parameters:
job_store (toil.jobStores.abstractJobStore.AbstractJobStore) – The JobStore to fetch JobDescriptions from.
config (toil.common.Config) – The configuration for the current run.
job_name (str) – The “job name” (a user friendly name) of the job to be run
job_store_id (str) – The job store ID of the job to be run
redirect_output_to_log_file (bool) – If False, log directly to the console instead of capturing job output.
local_worker_temp_dir (Optional[str]) – The directory for the worker to work in. May be recursively removed after the job runs.
debug_flags (Optional[set[str]]) – Flags to set on each job before running it.
- Return int:
1 if a job failed, or 0 if all jobs succeeded
- Return type:
- toil.worker.in_contexts(contexts)[source]¶
Unpickle and enter all the pickled, base64-encoded context managers in the given list. Then do the body, then leave them all.
- Parameters:
- Return type:
collections.abc.Iterator[None]