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

digraph inheritancec9437b1d39 { bgcolor=transparent; rankdir=LR; size="8.0, 12.0"; "Expando" [URL="../lib/expando/index.html#toil.lib.expando.Expando",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Pass inital attributes to the constructor:"]; "MagicExpando" [URL="../lib/expando/index.html#toil.lib.expando.MagicExpando",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Use MagicExpando for chained attribute access."]; "Expando" -> "MagicExpando" [arrowsize=0.5,style="setlinewidth(0.5)"]; "StatsDict" [URL="#toil.worker.StatsDict",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Subclass of MagicExpando for type-checking purposes."]; "MagicExpando" -> "StatsDict" [arrowsize=0.5,style="setlinewidth(0.5)"]; }

Subclass of MagicExpando for type-checking purposes.

jobs: List[str]
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

argparse.Namespace

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