mirror of
https://github.com/tubearchivist/tubearchivist.git
synced 2024-12-22 09:50:12 +00:00
handle return value of del_message
This commit is contained in:
parent
f22e02d2f1
commit
3d79f08311
@ -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):
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user