Рефакторинг задачи

This commit is contained in:
zakhy 2024-08-15 14:50:25 +07:00
parent e120517413
commit 54e06edc29

View File

@ -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: