AWS Thinkbox Discussion Forums

Event scripting - OnJobSubmitted path visibility

I’m noticing a weird thing when I have a job triggering a test event script. The job user directory contents is different during OnJobSubmitted than it is during OnJobFinished.

Basically there’s supposed to be a directory in there (where I’m sourcing some python modules) that only appears after the job finishes. Why wouldn’t it already be there to begin with? Unless it’s got something to do with the overall closed-environment that the just operates in.

On a side note, I’m setting a PYTHONPATH when I load the python plugin. Is there anyway to have this PYTHONPATH exist within the scope of the event as well? I’m having trouble determining when this PYTHONPATH exists in the process or even if its shared in the event scope.

Thanks in advance!

Your question is unclear. What modules are you sourcing from the job directory? What clones these modules?

Note that OnJobSubmitted is executed on the submitting machine, and OnJobFinished - on the rendering machine.

For the last question - you can set extra environment variables in the job properties, e.g. see job.SetJobEnvironmentKeyValue(), which are supposed to be applied when job scripts run. Not sure if they are also set in event scripts, however.

Apologies. This would be an event occurring on a python job. I’m not sure what you mean by modules sourcing from the job directory or what clones them.

However upon further reading I came to the conclusion that you mentioned - that OnJobSubmitted is just the submission from the user to the point of updating the database I imagine.
I started using the OnJobStarted and that accomplished what I was looking for. The established path was part of the PYTHONPATH (loaded during the python plugin preload).

I just originally took OnJobSubmitted to mean the moment it actually shows up in Deadline.

Thanks!

Privacy | Site terms | Cookie preferences