buildtest.scheduler.cobalt
Module Contents
Classes
The |
Attributes
- buildtest.scheduler.cobalt.logger
- class buildtest.scheduler.cobalt.CobaltJob(jobID)[source]
Bases:
buildtest.scheduler.job.JobThe
CobaltJobclass performs operation on cobalt job upon job submission such as polling job, gather job record, cancel job. We also retrieve job state and determine if job is pending, running, complete, suspended.- is_pending()[source]
Return
Trueif job is pending otherwise returnsFalse. When cobalt recieves job it is instartingfollowed byqueuedstate. We check if job is in either state.
- is_running()[source]
Return
Trueif job is running otherwise returnsFalse. Cobalt job state for running job is is marked asrunning
- is_complete()[source]
Return
Trueif job is complete otherwise returnsFalse. Cobalt job state for completed job job is marked asexiting
- is_suspended()[source]
Return
Trueif job is suspended otherwise returnsFalse. Cobalt job state for suspended is marked asuser_hold
- is_cancelled()[source]
Return
Trueif job is cancelled otherwise returnsFalse. Job state iscancelledwhich is set by classcancelmethod
- retrieve_jobdata()[source]
Gather Job state by running qstat -lf <jobid> which retrieves all fields. The output is in text format which is parsed into key/value pair and stored in a dictionary. This method will return a dict containing the job record
$ qstat -lf 347106 JobID: 347106 JobName : hold_job User : shahzebsiddiqui WallTime : 00:10:00 QueuedTime : 00:13:14 RunTime : N/A TimeRemaining : N/A