Hi,
I’m setting a custom event to apply a post job script globally. The script aims to rename the exported files that are on 2’s so that they a sequential. We’re doing this as the “renumber frames” option within maya doesn’t seem to work through deadline.
The script seems to be added to the job however the job status updates to “deleted” and then “corrupted” once I attempt to re-queue.
I haven’t been able to succesfully get any logs from the script. Has anybody come across this before? I’m new to python scripting so unsure where it’s failing.
I’ll add the param and event script below.
Thanks in advance!
from Deadline.Events import DeadlineEventListener
from Deadline.Scripting import RepositoryUtils
import sys
def GetDeadlineEventListener():
return SubmitEventTest()
def CleanupDeadlineEventListener(eventListener):
eventListener.Cleanup()
class SubmitEventTest(DeadlineEventListener):
def init(self):
if sys.version_info.major == 3:
super().init()
self.OnJobSubmittedCallback += self.OnJobSubmitted
def Cleanup(self):
del self.OnJobSubmittedCallback
## This is called when a job is submitted.
def OnJobSubmitted(self, job):
postJobScriptPath = r"G:\DeadlineShare\Deadline_PostScript.py"
RepositoryUtils.SetPostJobScript(job, postJobScriptPath)
RepositoryUtils.SaveJob(job)
self.LogInfo("Job saved with post-job script.")
[State]
Type=Enum
Items=Global Enabled;Opt-In;Disabled
Category=Options
CategoryOrder=0
Index=0
Label=State
Default=Global Enabled
Description=