buildtest.scheduler.cobalt
¶
Module Contents¶
Attributes¶
- buildtest.scheduler.cobalt.logger¶
- class buildtest.scheduler.cobalt.CobaltJob(jobID)[source]¶
Bases:
buildtest.scheduler.job.Job
The
CobaltJob
class 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
True
if job is pending otherwise returnsFalse
. When cobalt recieves job it is instarting
followed byqueued
state. We check if job is in either state.
- is_running()[source]¶
Return
True
if job is running otherwise returnsFalse
. Cobalt job state for running job is is marked asrunning
- is_complete()[source]¶
Return
True
if job is complete otherwise returnsFalse
. Cobalt job state for completed job job is marked asexiting
- is_suspended()[source]¶
Return
True
if job is suspended otherwise returnsFalse
. Cobalt job state for suspended is marked asuser_hold
- is_cancelled()[source]¶
Return
True
if job is cancelled otherwise returnsFalse
. Job state iscancelled
which is set by classcancel
method
- gather()[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