I’ve got a weird problem. Please see screenshot below.
Essentially, I’m failing a job via a post-script when certain criteria is met (ie. when something goes horribly wrong). The code I’m using the fail the job is
RepositoryUtils.FailJob(job)
Where RepositoryUtils is a short-hand for Deadline.Scripting.RepositoryUtils, and job is acquired via
If you have a look at the job’s error count, it is still listed as 0. And the visual group (batch name) is still happy blue.
Is this because I’m failing the job in a post-script, and Deadline thinks that’s not super important? Or does it have to do with the command(s) I’m using? More importantly, is there anything I can change in the script to make this more visible in the Monitor?
It’s worth mentioning that the FailJob() command triggers my event listener, so everything besides the way the Monitor is reading the situation seems to work as expected.
You cannot fail completed jobs, you’ll notice that this is not possible via the Monitor UI either. You can only fail a job if it has incomplete tasks in it.
Looks like if you use FailTasks() you can fail the job.
Thanks, failing all the tasks definitely makes it more visible in that the progress bar (summary in the Monitor) displays a larger percentage of red/failed.
However, if I fail the task manually in the Monitor the group/batch also turns red. If I have batches collapsed (which I often do), its super handy to have the top node go red as opposed to just the one job underneath it.
I’m just going to bump this once in case anyone has any insight to share.
What I would ultimately like to do is emulate the method that the Monitor calls when you manually fail a job. But as far as I can see, that’s all bundled up in compiled modules, and not accessible to myself.
In summary: Manually failing a job sets all the right visual cues in the Monitor, while failing via script does not. The job still fails, and triggers event hooks, but looks misleadingly active when browsing the Monitor