#3864 Try reducing the time the lock is needed
Merged by pingou. Opened by pingou.
rework_lock  into  master

Download 3864.patch

It seems that mysql has issue deleting the project when the
pagure.exceptions.RepoExistsException is raised because of lock
timeout: Lock wait timeout exceeded; try restarting transaction

So we tried reducing the time the lock is needed by just locking
the part where it makes sense rather than the full function.
From our empirical tests it worked, future will tell if it
persists.

Signed-off-by: Pierre-Yves Chibon pingou@pingoured.fr

Theoretically, something could happen in between creation of git repos and README creation, but that race is so specific, and I don't think that will happen that often.
:thumbsup:

rebased onto 6c716f1dbdc206f4d21379a1be0e181363aa8146

Pull-Request has been merged by pingou

Metadata