Sometime my draft job get stuck. Is there any way to apply a task time out to the deadline script ?
If you’re submitting a Draft job through the Monitor’s Draft submitter, or through the right-click Monitor submission script, there should be a spot to enter in a timeout value (this is in minutes). You can also modify the job properties of the Draft job after it’s already been submitted and set the ‘Maximum Render Time’ property.
If you’re looking to have a timeout applied on all Draft jobs that are automatically created using the Draft Event Plugin, you would have to edit the Event Plugin script to do that. That would apply to all Draft scripts equally, though, which might not be a huge deal. If you’re ok with that, here’s how you would change the Event Plugin to submit Draft jobs with a timeout. First, find the script in ‘events/Draft/Draft.py’ in your menu. You might want to make a backup copy of it before you change anything, just in case.
Next, find this spot of code:
[code] #apply the draft priority offset, clamping between 0 and 100
priorityOffset = GetIntegerConfigEntryWithDefault( “PriorityOffset”, 0 )
priority = max(0, min(100, job.Priority + priorityOffset))
fileHandle.write( "Priority=%s\n" % priority )
fileHandle.write( "OnJobComplete=%s\n" % job.OnJobComplete.ToString() )
fileHandle.write( "OutputFilename0=%s\n" % draftOutput )[/code]
It should be around line 100 or so.
Now, right below that block, add the following line:
fileHandle.write( "TaskTimeoutMinutes=%d\n" % 20 )
That will add a timeout of 20 minutes to all Draft jobs created through the Draft Event Plugin; you can obviously change the ‘20’ to however many minutes you want.
Cheers,
- Jon
Is Draft crashing?
Well I cannot call that a crash. It just get stuck on a job and stay on it. Last week a lost a weekend of draft render because he got stuck on a job for 48 hours. I already know that no render should be longer than an hour or so.
So i will try that code thanks !