Author Topic: returning job status  (Read 10988 times)

bijuramavfx

  • Sr. Member
  • ****
  • Posts: 40
returning job status
« 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


jburk

  • Administrator
  • *****
  • Posts: 493
Re: returning job status
« Reply #1 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



« Last Edit: November 06, 2012, 07:26:01 PM by jburk »