For jobs that are run locally, all main computation should be done in
the doCommand method method. Note that the doCommand method blocks until
completion and so no additional work will be done (e.g. job updates or
submissions) until it returns. For this reason, only short jobs should be
run locally without job control.
|
|
|
runsLocally(self)
Return True if the job runs on the JobDJ control host,
False if not. |
|
|
|
update(self)
Update the current job status, stored in the state
property. |
|
|
|
maxFailuresReached(self,
msg)
This is a method that will be called after the job has failed and the
maximum number of failures per JobDJ run has been
reached. |
|
|
|
finalize(self)
Clean up after a job successfully runs. |
|
|
|
doCommand(self,
*args,
**kwargs)
Execute the command associated with this job. |
|
|
|
run(self,
*args,
**kwargs)
Run the job. |
|
|
|
|
|
preCommand(self)
A method to make pre-command changes, like cd'ing to the correct
directory to run the command in. |
|
|
|
setup(self)
A method to do initial setup; executed after preCommand ,
just before doCommand . |
|
|
|
postCommand(self)
A method to restore things to the pre-command state. |
|
|
|
_getState(self)
Return the current state of the job. |
|
|
|
_setState(self,
state)
Set the current state of the job. |
|
|
|
isComplete(self)
Returns True if this job finished successfully |
|
|
|
hasStarted(self)
Returns True if this job has started (not waiting) |
|
|
|
|
|
getJobDJ(self)
Return the JobDJ instance that this job has been added to. |
|
|
|
__lt__(self,
other)
This comparison method determines the order of execution for jobs in
the JobDJ _jobqueue heap. |
|
|
|
addPrereq(self,
job)
Add a job that is an immediate prerequisite for this one. |
|
|
|
addGroupPrereq(self,
job)
Make all jobs connected to job prerequisites of all jobs
connected to this Job. |
|
|
|
getPrereqs(self)
Return a set of all immediate prerequisites for this job. |
|
|
|
_pruneGraph(self)
Remove this job from the prerequisites list of any dependents and
return a list of any dependent jobs that no longer have unfinished
prerequisites. |
|
|
|
genAllPrereqs(self,
seen=None)
A generator that yields all jobs that are prerequisites on this one. |
|
|
|
genAllJobs(self,
seen=None)
A generator that yields all jobs connected to this one. |
|
|
|
addFinalizer(self,
function,
run_dir=None)
Add a function to be invoked when the job completes successfully. |
|
|