Hi all,
We have the following case:
- we have some nice procedures for processing renders, which get applied in
OnJobStarted
,OnJobFinished
, etc. - we would like to invoke the same procedures manually on existing renders, preferably on the farm, in order to offload the process from the workstation.
- essentially we need to call
OnJobStarted
andOnJobFinished
in order, bypassing any rendering.
In order to achieve this, I first tried instantiating an event listener inside a script, by
listener = ProcessRenderEventListener()
Then I synthetically created a job and submitted it to the repo.
However, when I ran listener.OnJobStarted(job)
, I got
Error: NullReferenceException : Object reference not set to an instance of an object.
at Deadline.Events.DeadlineEventListener.LogInfo(String message)
File "e:\DeadlineRepository10\custom\scripts\Submission\SubmitHoudiniFlipbook.py", line 58, in __main__
listener.OnJobStarted(newJob)
File "e:/DeadlineRepository10\custom\events/ProcessRender\ProcessRender.py", line 457, in OnJobStarted
self.LogInfo("Using scene file to get toolkit: {}".format(scene_path))
---------- Inner Stack Trace ----------
at Deadline.Events.DeadlineEventListener.LogInfo(String message)
Which seems to imply that the self
reference inside the method is null when calling self.LogInfo
.
Creating a listener manually is only one way to achieve what we want, so I’m asking for suggestions.
Here are some more options:
- create a new “bypass”/dummy render plugin, which will call
CompleteJob
inside itsStartJobCallback
- in the event plugin, call
CompleteJob
onceOnJobStarted
is done, and if some conditions are met.