PipelineFX Forum
Qube! => SimpleCmds => Topic started by: bijuramavfx on November 05, 2012, 08:07:32 PM
-
Hi there:
Here is the code that I am trying to run andI am not getting the JobID after the submission
qubeJob = qb.Job()
qubeJob['name'] = job.sceneName
qubeJob['prototype'] = 'cmdrange'
qubeJob['package'] = {'cmdline' : jobCommandLine,
'range' : job.frames,
'frameCount' : 5,
'renderNode' : 'Render',
'script' : job.scene,
}
qubeJob['agenda'] = qb.genframes(qubeJob['package']['range'])
jobId = qb.submit(qubeJob)
print jobId
I get None ..?
Thanks and much appreciated
/Biju
-
qb.submit() returns a list, so you should do one of these two approaches:
jobId = qb.submit(qubeJob)[0]
print jobId
or
for j in qb.submit(job):
print '%(name)s: %(id)s' % j
I always use the 2nd form, it also covers the case if I change the script to submit multiple jobs; you just pass the list of jobs to qb.submit like this:
for j in qb.submit([jobA, jobB, jobC]):
print '%(name)s: %(id)s' % j
-
thanks jburk like always it works.. :-)