diff --git a/Common.py b/Common.py index 9bb2a11..26a0d7c 100644 --- a/Common.py +++ b/Common.py @@ -54,18 +54,18 @@ def doClean(): def getCurrentStatus(): _disk = psutil.disk_usage("/") _mem = psutil.virtual_memory() - _net = psutil.net_io_counters() _delta= getTimeDelta(datetime.now(),network["currentTime"]) - if getTimeDelta(datetime.now(), _do_move_time) > 3600: - p = threading.Thread(target=doClean) - p.setDaemon(True) - p.start() + _net = psutil.net_io_counters() if 60 > _delta > 0: _inSpeed = (_net.bytes_recv - network["in"]["currentByte"])/_delta _outSpeed = (_net.bytes_sent - network["out"]["currentByte"])/_delta else: _outSpeed = 0 _inSpeed = 0 + if getTimeDelta(datetime.now(), _do_move_time) > 3600: + p = threading.Thread(target=doClean) + p.setDaemon(True) + p.start() updateNetwork() return { "memTotal": parseSize(_mem.total), diff --git a/liveDownloader.py b/liveDownloader.py index 7d95f2c..ba5409e 100644 --- a/liveDownloader.py +++ b/liveDownloader.py @@ -32,8 +32,7 @@ def download(url): Common.modifyLastDownloadStatus("Download >{}< Exceed MaxSize".format(path)) break except Exception as e: - Common.appendError("Download >{}< With Exception {}".format(path, datetime.strftime(datetime.now(), "%y%m%d %H%M"), - e.__str__())) + Common.appendError("Download >{}< With Exception {}".format(path, e.__str__())) f.close() isDownload = False Common.modifyLastDownloadStatus("Download >{}< Finished".format(path)) diff --git a/static/index.js b/static/index.js index 952cd80..2d54541 100644 --- a/static/index.js +++ b/static/index.js @@ -16,35 +16,35 @@ function taskUpdate(){ $("#download").html(function(){ var ret = "" res.data.download.reverse().forEach(function(obj){ - ret += "
CPU使用率 | +CPU使用率 | % | |
内存使用率 | +内存使用率 | /(%) | |
磁盘使用率 | +磁盘使用率 | /(%) | |
网络速率 | +网络速率 | ↓ /s | ↑ /s |
下载日志 | +下载日志 | |
转码日志 队列 |
+ 转码日志 队列 |
|
上传日志 队列 |
+ 上传日志 队列 |
|
错误日志 | +错误日志 | |
操作日志 | +操作日志 |