This commit is contained in:
Alok Saldanha
2019-09-17 11:06:50 -04:00
parent f7f49b3568
commit 820314adff
6 changed files with 15 additions and 11 deletions
+6 -2
View File
@@ -30,7 +30,11 @@ class BackendCache:
def check_entry(self, dataset):
contents = self.entry_list
matches = [c for c in contents if c.dataset == dataset and c.status != "terminated"]
matches = [
c
for c in contents
if c.dataset == dataset and c.status != "terminated"
]
if len(matches) == 0:
return None
@@ -61,7 +65,7 @@ class BackendCache:
time.sleep(1) # Automatic refresh is too fast, needs a second to pause
return entry
def prune(self, process):
self.entry_list.remove(process)
process.terminate()