From f91f06b5b54250ab67ae0e132a3340fe4a68d7f5 Mon Sep 17 00:00:00 2001 From: Nathaniel Kofalt <nathaniel@kofalt.com> Date: Tue, 31 Oct 2017 16:32:40 -0500 Subject: [PATCH] Correct match_ids in containerhandler.get_jobs --- api/handlers/containerhandler.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/handlers/containerhandler.py b/api/handlers/containerhandler.py index 2ccb3d98..cf6d76c7 100644 --- a/api/handlers/containerhandler.py +++ b/api/handlers/containerhandler.py @@ -271,9 +271,9 @@ class ContainerHandler(base.RequestHandler): # Stateful closure to remove search duplicates # Eventually, this code should not call Queue.search and should instead do its own work. def match_ids(x): - should_add = str(x['_id']) in match_ids.unique_job_ids + in_set = str(x['_id']) in match_ids.unique_job_ids match_ids.unique_job_ids.add(str(x['_id'])) - return should_add + return not in_set match_ids.unique_job_ids = set() results = filter(match_ids, results) -- GitLab