- set publishInProgress to false if event function fails