handle return value of del_message

This commit is contained in:
simon 2021-09-27 17:44:42 +07:00
parent f22e02d2f1
commit 3d79f08311
2 changed files with 3 additions and 2 deletions

View File

@ -104,7 +104,8 @@ def get_message(key):
def del_message(key):
"""delete key from redis"""
redis_connection = redis.Redis(host=REDIS_HOST)
redis_connection.execute_command("DEL", key)
response = redis_connection.execute_command("DEL", key)
return response
def get_dl_message(cache_dir):

View File

@ -133,7 +133,7 @@ def run_restore_backup():
def kill_dl(task_id):
"""kill download worker task by ID"""
app.control.revoke(task_id, terminate=True)
del_message("dl_queue_id")
_ = del_message("dl_queue_id")
RedisQueue("dl_queue").clear()
# clear cache