Fix monitor job function
When checking if the workflow execution is marked as finished in the database, the session has to be reset to avoid stale data
When checking if the workflow execution is marked as finished in the database, the session has to be reset to avoid stale data