Hi, I am attempting to set up an event that auto-suspends tasks on submission based on region.
We have multiple regions that only sync periodically, but a centralised render system. I would like to be able to set it so that people working on-site at the render system’s jobs (most employees) are unaffected, but anyone submitting from off-site has their task suspended.
I have implemented an event that handles this, however it is not working correctly - it is unfortunately suspending ALL jobs that are submitted regardless of their region.
def OnJobSubmitted(self, job):
if job.GetJobInfoKeyValue('region') != "siteA":
RepositoryUtils.SuspendJob(job)
Any help is greatly appreciated