I’d like to get some information on the execution pattern for a job completing, its OnJobFinished event firing, and a dependent job being released. My gut instinct is that the job is considered “done” as soon as its last task completes, so the OnJobFinished event could potentially run at the same time a dependent job were released. Is this the case, or will dependent jobs actually wait for the OnJobFinshed event to run?
I believe the onjobfinished should be done as part of the job, while the release from pending to queued is part of house cleaning, but I will need to get confirmation on this.
I’m assuming that the pending job scan is running on a different machine than the OnJobFinished event, but that isn’t really important. My question is, at what point is a dependent job considered “ready to release” relative to a given job dependency? Is it after the dependency’s last task has completed, or after its OnJobFinished event has finished? My instinct is it’s the former, but I’d just like to be sure.
So I checked with one of our devs and he advised that we save the completed job before triggering the event so there is some chance the dependent job could release before the onjobfinished event is triggered.