Hello Stephen
Thanks for reaching out. The Python code you are running to change the job’s task list might be making your job corrupted, this forums post tell about the cause of corruption. It is not recommended to change the job tasks at the render time.
What run that Python script on the job? like, is it a prejob script or OnJobSubmitted?
I see you are using pools and have disabled Workers, can’t you use groups instead?