Check project state inside the lock

This commit is contained in:
Shane Kilkelly 2018-12-05 14:58:51 +00:00
parent 439d55d805
commit 925ebc2133

View file

@ -360,8 +360,8 @@ public class Bridge {
String migratedFromID = doc.getMigratedFromID();
if (migratedFromID != null) {
Log.info("[{}] Has a migratedFromId: {}", projectName, migratedFromID);
ProjectState sourceState = dbStore.getProjectState(migratedFromID);
try (LockGuard __ = lock.lockGuard(migratedFromID)) {
ProjectState sourceState = dbStore.getProjectState(migratedFromID);
switch (sourceState) {
case NOT_PRESENT:
// Normal init-repo