Hi,
I’m trying to create a custom event script which will add prejob script to any jobs submitted on the specified plugin type like Maya for example, using OnJobSubmitted
callback function and RepositoryUtils.SetPreJobScript()
function. But after submission this job never starts and always on queue and the progress bar show completed blue color like below screenshot,
If i suspend the first frame, the job shows corrupted like below,
Once i run Repair corrupted job and requeue it, the job runs fine after that. I’ve attached my prejob submission event script below,
from Deadline.Events import *
from Deadline.Scripting import *
def GetDeadlineEventListener():
return PFxPreJob()
def CleanupDeadlineEventListener(deadlinePlugin):
deadlinePlugin.Cleanup()
class PFxPreJob(DeadlineEventListener):
def __init__(self):
self.OnJobSubmittedCallback += self.OnJobSubmitted
def Cleanup(self):
del self.OnJobSubmittedCallback
def OnJobSubmitted(self, job):
pre_job = "L:/12_SCRIPTS_AND_WORKFILES/Pipeline_Files/pipeline_next/Deadline/pre_job/pfx_pre_job.py"
if job.JobPlugin in ('MayaBatch'):
try:
RepositoryUtils.SetPreJobScript(job, pre_job)
self.LogInfo("Pre-Job script added")
except Exception as e:
print(str(e))
Please let me know if i need to make any changes in the script or anyother way to submit prejob script for all type of plugins.