WIP: Fix race condition during project deletion
This solves a possible race condition, similarly to what has been done for groups in gitlab-org/gitlab-ce!7528.
I will try to add a post-deployment migration to reschedule the deletion of all the soft-deleted projects that were not actually deleted.
The only issue with that is that ProjectDestroyWorker
expect a user_id
which was lost when the original Sidekiq job was done. I think that should be ok to just grab any master
from project_members
for each project we'd need to reschedule the deletion...
Solves #20984 (closed), gitlab-org/gitlab-ee#1165