remove unused monitor_cache_dir method

This commit is contained in:
simon 2022-05-24 15:54:41 +07:00
parent c39f8a9cb8
commit 0ac9243389
No known key found for this signature in database
GPG Key ID: 2C15AA5E89985DD4
1 changed files with 0 additions and 22 deletions

View File

@ -8,7 +8,6 @@ import json
import os
import redis
from home.src.ta.helper import ignore_filelist
class RedisBase:
@ -95,27 +94,6 @@ class RedisArchivist(RedisBase):
return all_messages
@staticmethod
def monitor_cache_dir(cache_dir):
"""
look at download cache dir directly as alternative progress info
"""
dl_cache = os.path.join(cache_dir, "download")
all_cache_file = os.listdir(dl_cache)
cache_file = ignore_filelist(all_cache_file)
if cache_file:
filename = cache_file[0][12:].replace("_", " ").split(".")[0]
mess_dict = {
"status": "message:download",
"level": "info",
"title": "Downloading: " + filename,
"message": "",
}
else:
return False
return mess_dict
class RedisQueue(RedisBase):
"""dynamically interact with the download queue in redis"""