diff --git a/Common.py b/Common.py index c5e74a8..6f68f79 100644 --- a/Common.py +++ b/Common.py @@ -43,8 +43,6 @@ def getTimeDelta(a, b): def getCurrentStatus(): _disk = psutil.disk_usage("/") - if _disk.percent > 85: - os.system("rm -f `find . -ctime 1 -name '*.flv'`") _mem = psutil.virtual_memory() _net = psutil.net_io_counters() _delta= getTimeDelta(datetime.now(),network["currentTime"]) @@ -52,6 +50,8 @@ def getCurrentStatus(): _inSpeed = (_net.bytes_recv - network["in"]["currentByte"])/_delta _outSpeed = (_net.bytes_sent - network["out"]["currentByte"])/_delta else: + if _disk.percent > 85: + os.system(r"find ./ \( -mtime 1 -o -mtime 2 -o -mtime 3 \) -name '*.flv' -delete") _outSpeed = 0 _inSpeed = 0 updateNetwork() diff --git a/WebMain.py b/WebMain.py index 482a49c..8f2c41f 100644 --- a/WebMain.py +++ b/WebMain.py @@ -198,14 +198,14 @@ def fileDownload(path): def SubThread(): - t = threading.Thread(target=RUN, args=(Common.config['l_u'],)) + t = threading.Thread(target=RUN, args=()) t.setDaemon(True) t.start() while True: if t.is_alive(): sleep(240) else: - t = threading.Thread(target=RUN, args=(Common.config['l_u'],)) + t = threading.Thread(target=RUN, args=()) t.setDaemon(True) t.start() diff --git a/templates/index.html b/templates/index.html index ad048f3..57aede3 100644 --- a/templates/index.html +++ b/templates/index.html @@ -50,25 +50,23 @@
下载日志 | -+ | ||
转码日志 | -转码队列 |
+ 转码日志 队列 |
|
上传日志 | -上传队列 |
+ 上传日志 队列 |
|
错误日志 | -+ | ||
操作日志 | -+ |