AWS Thinkbox Discussion Forums

Access to Job Object jobInfo and pluginInfo parameters and do not fail the render

Hi @Nreddy @Justin_B @zainali

During the respective Deadline Plugin’s "InitializeProcess" when Deadline Worker is rendering a task/frame and parsing the logs in real-time how to get access to the "job" object such as the jobID, taskID, jobName, submittingUser etc?

For example, I want "pass" the "HandleArnoldStdoutError" if the job name (belongs to the scene) has "sc087_0090" in it.

File: DeadlineRepository10\custom\plugins\Gaffer\Gaffer.py
115:         # Arnold progress and error
116:         self.AddStdoutHandlerCallback( ".*ERROR +\\|.*" ).HandleCallback += self.HandleArnoldStdoutError
File: DeadlineRepository10\custom\plugins\Gaffer\Gaffer.py
250:     def HandleArnoldStdoutError(self):
251:         self.FailRender(self.GetRegexMatch(0))

The same applies to other factory Deadline plugins too, so the Gaffer plugin is an example here since that’s what I am currently testing but the logic remains the same and hence the query.

Thanks,
Bhavik
Fractal Picture

Tagging @egmehl FYI, since in the Gaffer scene we have the

ai:abort_on_error

turned off,


so Ideally, we would prefer this setting to flow/pass to the GafferDeadline plugin’s HandleArnoldStdoutError handling and not fail the frame/task if this setting (ai:abort_on_error) is not turned on.

Thanks,
Bhavik
Fractal Picture

Pardon me @egmehl partly those added snippets in the code of Gaffer.py is our handlers added to it. FYI,

However, my both question, I feel are still applicable, which are,
a). If ai:abort_on_error is turned on, would that be passed to Gaffer.py to handle the job/frame/task failure detection?

b). @Nreddy @Justin_B @zainali accessing the job object attributes inside the "InitializePorcess" and the "HandleCallback" function overloads, so we can handle the behavior or make exceptions more granularly.

Please let me know if there are any questions.

Thanks,
Bhavik
Fractal Picture

Since any application plugin is inheriting from the DeadlinePlugin class, you’ll be able to use self.GetJob() to fetch the current job as an object you can interrogate.

So you could turn:

def HandleArnoldStdoutError(self):
    self.FailRender(self.GetRegexMatch(0))

into:

def HandleArnoldStdoutError(self):
    if "sc087_0090" in self.GetJob().JobName():
        pass
    else:
        self.FailRender(self.GetRegexMatch(0))
Privacy | Site terms | Cookie preferences