Hi All
I’m getting my face back into the scripting side to Deadline but I am struggling with the very first steps.
I want to create a python script with the following modules from deadline 10.0.15.5
from Deadline.Scripting import *
Using these…
“RepositoryUtils”
“JobUtils”
And I am getting “No module named Scripting”
This worked fine the previous version 8 but is deadline 10 different now?
And if I am missing the Scripting python file/module where would I download this from?
I’m assuming it missing from the python2.7 directory “site-packages”
The ultimate goal is to use Python script to access Deadline 10.0.15.5 “CalculateJobStatistics” to find the Job average frame time, this is the old script I used before.
from Deadline.Scripting import *
def main( *args ):
# Grab all jobs
alljobs = RepositoryUtils.GetJobs( True )
# Filter down to only "Active" jobs
jobs=[]
for job in alljobs:
if job.JobStatus == "Active":
jobs.append( job )
for job in jobs:
print "JobStatus: %s" % job.JobStatus
jobId = job.JobId
print "JobId: %s" % jobId
jobName = job.JobName
print "JobName: %s" % jobName
jobPool = job.JobPool
print "JobPool: %s" % jobPool
jobCompletedChunks = job.CompletedChunks
print "JobCompletedChunks: %s" % jobCompletedChunks
job = RepositoryUtils.GetJob( jobId, True )
tasks = RepositoryUtils.GetJobTasks( job, True )
stats = JobUtils.CalculateJobStatistics( job, tasks )
jobAverageFrameTime = stats.AverageFrameTime
jobAverageRamUsage = stats.AverageRamUsage/1024/1024
print "JobAverageFrameTime: %s" % jobAverageFrameTime
print "JobAverageRamUsage: %sMb" % jobAverageRamUsage
Any help on this would be much appreciated.
Thanks
Chris