toil.worker

Module Contents

Classes

StatsDict

Subclass of MagicExpando for type-checking purposes.

Functions

nextChainable(predecessor, jobStore, config)

Returns the next chainable job's JobDescription after the given predecessor

workerScript(jobStore, config, jobName, jobStoreID[, ...])

Worker process script, runs a job.

parse_args(args)

Parse command-line arguments to the worker.

in_contexts(contexts)

Unpickle and enter all the pickled, base64-encoded context managers in the

main([argv])

Attributes

logger

toil.worker.logger
class toil.worker.StatsDict(*args, **kwargs)[source]

Bases: toil.lib.expando.MagicExpando

Subclass of MagicExpando for type-checking purposes.

jobs: List[toil.lib.expando.MagicExpando]
toil.worker.nextChainable(predecessor, jobStore, 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:
Return type:

Optional[toil.job.JobDescription]

toil.worker.workerScript(jobStore, config, jobName, jobStoreID, redirectOutputToLogFile=True)[source]

Worker process script, runs a job.

Parameters:
Return int:

1 if a job failed, or 0 if all jobs succeeded

Return type:

int

toil.worker.parse_args(args)[source]

Parse command-line arguments to the worker.

Parameters:

args (List[str]) –

Return type:

Any

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:

contexts (List[str]) –

Return type:

Iterator[None]

toil.worker.main(argv=None)[source]
Parameters:

argv (Optional[List[str]]) –

Return type:

None