AWS Thinkbox Discussion Forums

Deadline Python API, changing job status prevents updates to dependencies

Heya,
I am not sure if this is a bug or intended for some technical reason. I am writing a tool to set job dependencies and the final lines of the code are as follows:

RepositoryUtils.PendJob(job)
job.SetJobDependencyIDs(Id_list)

If I run the functions separately, I can correctly update the job dependency list however once I pend the job the list is cleared.

If I pend the job and then set the dependencies this works as expected.

However, no matter the order of the above functions, if they are in the same script the job dependency list does NOT update (even with sleep functions to delay the dependency change)!!!

Can someone point me in the right direction please?

I think you might need
RepositoryUtils.SaveJob(job)
at the end

1 Like

Yep that does it! Is that standard good practice whenever changing parts of a job? And how come it is required here but other commands don’t seem to need it?

I think PendJob directly moves the job to pending, but modifying job properties requires a save. Not completely clear on the distinction.

1 Like
Privacy | Site terms | Cookie preferences