File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
backend/btrixcloud/migrations Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ async def migrate_up(self):
5757 for file_ in crawl .files :
5858 if not file_ .replicas :
5959 # Check that there isn't an in-progress job for this file
60- matching_job = await jobs_mdb .find (
60+ if await jobs_mdb .find (
6161 {
6262 "type" : BgJobType .CREATE_REPLICA .value ,
6363 "object_id" : crawl .id ,
@@ -66,8 +66,7 @@ async def migrate_up(self):
6666 "started" : {"$ne" : None },
6767 "finished" : None ,
6868 }
69- )
70- if matching_job :
69+ ):
7170 continue
7271
7372 try :
@@ -94,7 +93,7 @@ async def migrate_up(self):
9493 continue
9594
9695 # Check there isn't already an in-progress job for this profile
97- matching_job = await jobs_mdb .find (
96+ if await jobs_mdb .find (
9897 {
9998 "type" : BgJobType .CREATE_REPLICA .value ,
10099 "object_id" : profile .id ,
@@ -103,8 +102,7 @@ async def migrate_up(self):
103102 "started" : {"$ne" : None },
104103 "finished" : None ,
105104 }
106- )
107- if matching_job :
105+ ):
108106 continue
109107
110108 try :
You can’t perform that action at this time.
0 commit comments