From 56675029107111332baca94163ee5ae109517748 Mon Sep 17 00:00:00 2001 From: Brian Caswell Date: Thu, 22 Jul 2021 14:31:03 -0400 Subject: [PATCH] process all expired nodes rather than those not already marked for deletion --- src/api-service/__app__/onefuzzlib/workers/nodes.py | 3 --- src/api-service/__app__/onefuzzlib/workers/pools.py | 1 - 2 files changed, 4 deletions(-) diff --git a/src/api-service/__app__/onefuzzlib/workers/nodes.py b/src/api-service/__app__/onefuzzlib/workers/nodes.py index 4da60d36a1..a4a6ae1373 100644 --- a/src/api-service/__app__/onefuzzlib/workers/nodes.py +++ b/src/api-service/__app__/onefuzzlib/workers/nodes.py @@ -456,12 +456,9 @@ def reimage_long_lived_nodes(cls, scaleset_id: UUID) -> None: time_filter = "Timestamp lt datetime'%s'" % ( (datetime.datetime.utcnow() - NODE_REIMAGE_TIME).isoformat() ) - # skip any nodes already marked for reimage/deletion for node in cls.search( query={ "scaleset_id": [scaleset_id], - "reimage_requested": [False], - "delete_requested": [False], }, raw_unchecked_filter=time_filter, ): diff --git a/src/api-service/__app__/onefuzzlib/workers/pools.py b/src/api-service/__app__/onefuzzlib/workers/pools.py index 409b9f8331..6d8ba01e59 100644 --- a/src/api-service/__app__/onefuzzlib/workers/pools.py +++ b/src/api-service/__app__/onefuzzlib/workers/pools.py @@ -227,7 +227,6 @@ def halt(self) -> None: delete_queue(self.get_pool_queue(), StorageType.corpus) ShrinkQueue(self.pool_id).delete() logging.info("pool stopped, deleting: %s", self.name) - self.state = PoolState.halt self.delete() return