From 54e06edc298b690ff4da066ad33d6ad017db4746 Mon Sep 17 00:00:00 2001 From: zakhy Date: Thu, 15 Aug 2024 14:50:25 +0700 Subject: [PATCH] =?UTF-8?q?=D0=A0=D0=B5=D1=84=D0=B0=D0=BA=D1=82=D0=BE?= =?UTF-8?q?=D1=80=D0=B8=D0=BD=D0=B3=20=D0=B7=D0=B0=D0=B4=D0=B0=D1=87=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/apps/main/tasks.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/apps/main/tasks.py b/app/apps/main/tasks.py index 4b7078d..219c448 100644 --- a/app/apps/main/tasks.py +++ b/app/apps/main/tasks.py @@ -84,7 +84,7 @@ def set_cache_value(key: str, value: str) -> str: def get_cache_value(key: str) -> bool: with RedisService(host=REDIS_HOST, port=REDIS_PORT, db=2) as redis_service: value = redis_service.get_value('cache_tasks/' + key) - return bool(value) + return bool(int(value)) def delete_cache_value(key: str) -> str: @@ -104,6 +104,7 @@ def create_scales_control_data(): return res return 'Skip' + @shared_task def write_scale_control_data_to_redis(): try: