Only remove task from p4-pending-cmds when it is finished normally