class documentation

class JobExecutor(object):

View In Hierarchy

Class which manages the submission and execution of multiple jobs.

Note that instances of this class should not be reused between GetResults() calls.

Method __init__ Undocumented
Method AddJobId Adds a job ID to the internal queue.
Method GetResults Wait for and return the results of all jobs.
Method QueueJob Record a job for later submit.
Method SubmitPending Submit all pending jobs.
Method WaitOrShow Wait for job results or only print the job IDs.
Instance Variable cl Undocumented
Instance Variable feedback_fn Undocumented
Instance Variable jobs Undocumented
Instance Variable opts Undocumented
Instance Variable queue Undocumented
Instance Variable verbose Undocumented
Static Method _IfName Helper function for formatting name.
Method _ChooseJob Choose a non-waiting/queued job to poll next.
Instance Variable _counter Undocumented
def __init__(self, cl=None, verbose=True, opts=None, feedback_fn=None):

Undocumented

def AddJobId(self, name, status, job_id):

Adds a job ID to the internal queue.

def GetResults(self):

Wait for and return the results of all jobs.

Returns
listlist of tuples (success, job results), in the same order as the submitted jobs; if a job has failed, instead of the result there will be the error message
def QueueJob(self, name, *ops):

Record a job for later submit.

Parameters
name:stringa description of the job, will be used in WaitJobSet
*opsUndocumented
def SubmitPending(self, each=False):

Submit all pending jobs.

def WaitOrShow(self, wait):

Wait for job results or only print the job IDs.

Parameters
wait:booleanwhether to wait or not
cl =

Undocumented

feedback_fn =

Undocumented

jobs =

Undocumented

opts =

Undocumented

queue: list =

Undocumented

verbose =

Undocumented

@staticmethod
def _IfName(name, fmt):

Helper function for formatting name.

def _ChooseJob(self):

Choose a non-waiting/queued job to poll next.

_counter =

Undocumented