- class buildtest.scheduler.cobalt.CobaltJob(jobID)[source]¶
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.
Trueif job is pending otherwise returns
False. When cobalt recieves job it is in
queuedstate. We check if job is in either state.
Trueif job is running otherwise returns
False. Cobalt job state for running job is is marked as
Trueif job is complete otherwise returns
False. Cobalt job state for completed job job is marked as
Trueif job is suspended otherwise returns
False. Cobalt job state for suspended is marked as
Trueif job is cancelled otherwise returns
False. Job state is
cancelledwhich is set by class
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