mirror of
https://github.com/tubearchivist/tubearchivist-frontend.git
synced 2024-11-22 20:00:15 +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):
|
def del_message(key):
|
||||||
"""delete key from redis"""
|
"""delete key from redis"""
|
||||||
redis_connection = redis.Redis(host=REDIS_HOST)
|
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):
|
def get_dl_message(cache_dir):
|
||||||
|
@ -133,7 +133,7 @@ def run_restore_backup():
|
|||||||
def kill_dl(task_id):
|
def kill_dl(task_id):
|
||||||
"""kill download worker task by ID"""
|
"""kill download worker task by ID"""
|
||||||
app.control.revoke(task_id, terminate=True)
|
app.control.revoke(task_id, terminate=True)
|
||||||
del_message("dl_queue_id")
|
_ = del_message("dl_queue_id")
|
||||||
RedisQueue("dl_queue").clear()
|
RedisQueue("dl_queue").clear()
|
||||||
|
|
||||||
# clear cache
|
# clear cache
|
||||||
|
Loading…
Reference in New Issue
Block a user