I was mostly thinking of the case where taskStorage.setStatus fails in taskQueue.notifyStatus. If nothing is keeping the db in sync with in-memory state, at this point we will become permanently out of sync (in memory we think the task is complete, but the db thinks it has not run yet). So I think some periodic background sync needs to exist, either memory -> db or db -> memory. Either one would solve this problem but I thought db -> memory could be convenient if a user ever wants to manually edit the database for some reason.