Updated release API in TransformationJob such that it only takes care of stopping transcoders and releasing muxers without having to deal with callbacks. Exceptions that can be ignored here are now handled & logged to ensure that the execution continues.
Separated out logic that updates stats (with latest target format) and deletes output files (in error scenarios) into individual methods.
Updated overall terminal state (cancelled/completed/failed) handling logic to follow a deterministic order of updating stats, stopping & releasing transcoders, deleting output files, and invoking appropriate callbacks.
Testing Done:
Updated unit tests
Manual testing to make sure existing functionality did not break and all app callbacks are invoked appropriately
Testing Done: