mirror of
https://github.com/tubearchivist/tubearchivist.git
synced 2024-12-23 18:30:12 +00:00
remove legacy kill_dl task
This commit is contained in:
parent
2bc92c9095
commit
f304c2eb02
@ -263,27 +263,6 @@ def run_restore_backup(self, filename):
|
|||||||
print("index restore finished")
|
print("index restore finished")
|
||||||
|
|
||||||
|
|
||||||
@shared_task(name="kill_download")
|
|
||||||
def kill_dl(task_id):
|
|
||||||
"""kill download worker task by ID"""
|
|
||||||
if task_id:
|
|
||||||
app.control.revoke(task_id, terminate=True)
|
|
||||||
|
|
||||||
_ = RedisArchivist().del_message("dl_queue_id")
|
|
||||||
RedisQueue(queue_name="dl_queue").clear()
|
|
||||||
|
|
||||||
_ = clear_dl_cache(CONFIG)
|
|
||||||
|
|
||||||
# notify
|
|
||||||
mess_dict = {
|
|
||||||
"status": "message:download",
|
|
||||||
"level": "error",
|
|
||||||
"title": "Canceling download process",
|
|
||||||
"message": "Canceling download queue now.",
|
|
||||||
}
|
|
||||||
RedisArchivist().set_message("message:download", mess_dict, expire=True)
|
|
||||||
|
|
||||||
|
|
||||||
@shared_task(bind=True, name="rescan_filesystem", base=BaseTask)
|
@shared_task(bind=True, name="rescan_filesystem", base=BaseTask)
|
||||||
def rescan_filesystem(self):
|
def rescan_filesystem(self):
|
||||||
"""check the media folder for mismatches"""
|
"""check the media folder for mismatches"""
|
||||||
|
Loading…
Reference in New Issue
Block a user