From 70affaf851608df1118225d7d209598d770f8926 Mon Sep 17 00:00:00 2001 From: MohammadMahdi Javid Date: Wed, 6 Dec 2023 09:41:46 +0100 Subject: [PATCH] fix #1068 : experimented changes --- openwpm/storage/storage_controller.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/openwpm/storage/storage_controller.py b/openwpm/storage/storage_controller.py index 9175c6388..52db0ce61 100644 --- a/openwpm/storage/storage_controller.py +++ b/openwpm/storage/storage_controller.py @@ -214,7 +214,10 @@ async def finalize_visit_id( return None self.logger.info("Awaiting all tasks for visit_id %d", visit_id) - for task in self.store_record_tasks[visit_id]: + + store_record_tasks = self.store_record_tasks[visit_id] + del self.store_record_tasks[visit_id] + for task in store_record_tasks: await task del self.store_record_tasks[visit_id] self.logger.debug( @@ -535,6 +538,7 @@ def get_most_recent_status(self) -> int: # Check last status signal if (time.time() - self._last_status_received) > STATUS_TIMEOUT: + self._last_status = None raise RuntimeError( "No status update from the storage controller process " "for %d seconds." % (time.time() - self._last_status_received)