Hey there, long time.
I was trying to write a script that would delete error reports from failed frames and then requeue the failed frames. I do not see any option in the scripting reference for deleting error reports. Am I missing something?
Thanks!
RepositoryUtils has these functions:
- RepositoryUtils.DeleteJobReport( string jobID, Report report )
- RepositoryUtils.DeleteJobReports( string jobId, Report[] reports )
- RepositoryUtils.DeleteAllJobReports( string jobId )
You can get a job’s reports using this function:
- RepositoryUtils.GetJobReports( string jobId )
It returns a JobReportCollection object, and you can get the list of error reports and delete them for a specific task like this:
reportCollection = RepositoryUtils.GetJobReports( jobId )
errorReports = reportCollection.GetErrorReports()
reportsToDelete = []
for report in errorReports:
if report.ReportTaskID == taskId:
reportsToDelete.append(report)
RepositoryUtils.DeleteJobReports( jobId, reportsToDelete )
Hope that helps!
Ryan
Right on! That’s what I needed for sure!