PipelineFX Forum

Qube! => SimpleCmds => Topic started by: bijuramavfx on November 06, 2012, 05:00:32 PM

Title: returning job status
Post by: bijuramavfx on November 06, 2012, 05:00:32 PM
Hi there:

How do I get the job status given the JobId - was trying

jobs = qb.jobinfo(id=[jobId])
print jobs.status

Thanks
/Biju

Title: Re: returning job status
Post by: jburk on November 06, 2012, 07:21:28 PM
qb.jobinfo() also returns a list of jobs.  Try:


Code: [Select]
import qb

infos = qb.jobinfo(id=2500)

if len(infos):
    for job in infos:
        print 'job id %(id)s - %(name)s: status = %(status)s' % job
        print 'jobs are dictionaires, so you can get the status as %s' %  job['status']


which prints out:

job id 2500 - maya render dirmap_test.ma: status = complete
jobs are dictionaires, so you can get the status as complete