Do all relevant database reading/modifying inside `maybeRunTaskInBackground`. Notably, `LoadComplete` will load the reflist of a repo. if this is done outside of a background operation, the data might be outdated when the background tasks runs.