From 6a5500bf56932e9101870b15dac1f4b1c1e2034e Mon Sep 17 00:00:00 2001 From: Devin Gaffney Date: Thu, 26 Sep 2024 08:18:26 -0700 Subject: [PATCH] CV2-5362 Set expiration explicitly on all SharedModel keys --- app/main/lib/shared_models/shared_model.py | 1 + 1 file changed, 1 insertion(+) diff --git a/app/main/lib/shared_models/shared_model.py b/app/main/lib/shared_models/shared_model.py index 300b821f..8747bac4 100644 --- a/app/main/lib/shared_models/shared_model.py +++ b/app/main/lib/shared_models/shared_model.py @@ -85,6 +85,7 @@ def get_task(self, timeout=0): def send_response(self, task, response): self.datastore.set(task.task_id, json.dumps({"response": response})) + self.datastore.expire(task.task_id, 60*60*24) def run(self): while True: