Hi,
I’m trying to output the completed job information so that we could build our own tools around it.
The data I’m after is the same data you’ll get when using the “Farm Status Reports” tool.
I’m aware of the fact that Deadline already create this data, but I’m looking to mirror it to our specific folders, for our specific workflows.
Because I want this data on job completion, an event script is the first thing that comes to mind, but unfortunately I can’t find the proper function to get the data.
I can get some of it using the Deadline.Jobs.Job class, but I’m also looking for the rest of it (Average Frame Time, CPU Usage, etc.).
Those seem to be in the Deadline.Statistics.JobEntry class, but it looks like I’m not using it properly…
This is the test event script:
[code]from System.IO import *
from System.Text import *
from Deadline.Events import *
from Deadline.Scripting import *
from Deadline.Reports import *
from Deadline.Statistics import *
def GetDeadlineEventListener():
return MyEvent()
class MyEvent (DeadlineEventListener):
def __init__( self ):
self.OnJobFinishedCallback += self.OnJobFinished
def OnJobFinished( self, job ):
outputFilenames = job.JobOutputFileNames
for i in range( 0, len(outputFilenames) ):
jobTaskCollection = RepositoryUtils.GetJobTasks(job, True)
jobEntry = JobUtils.CalculateJobStatistics( job, jobTaskCollection )[/code]
This code errors out saying “Event Error (OnJobFinished): can not create two instances of DeadlineApplicationManager”.
Any insight you have on the matter will be appreciated.
Thanks.