mirror of
https://github.com/Novartis/cellxgene-gateway.git
synced 2026-10-07 13:08:11 +08:00
#2 blackened
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user