Fix job duration reporting
What does this MR do?
Fix job duration reporting
Follow-up for !5583 (merged)
There were still some edge cases when the job duration was collected incorrectly, messing up usage logs and metrics.
This change should finally fix that.
Why was this MR needed?
What's the best way to test this MR?
What are the relevant issue numbers?
Closes Fix job duration reported in metrics in usage logs (#38926 - closed)
Edited by Tomasz Maczukin