Update the task in the historydb only if there was a change in status, prevent multiple updates of the same status