디스크가 4GB 이상 남았을 때만 Crawling
This commit is contained in:
@@ -7,6 +7,7 @@ import os
|
||||
from .Setting import Setting
|
||||
from .ProxyHandler import ProxyHandler
|
||||
from .Logger import Logger
|
||||
from .Util import Util
|
||||
|
||||
|
||||
class PageLink:
|
||||
@@ -201,6 +202,10 @@ class Crawler:
|
||||
self.download_files(file)
|
||||
|
||||
def crawl(self):
|
||||
if Util.get_free_space() < 4*1024*1024:
|
||||
Logger.log('Disk space is less than 4GB. Aborted')
|
||||
return
|
||||
|
||||
Logger.log('Crawling start')
|
||||
self.crawl_torrent()
|
||||
Logger.log('Crawling finished')
|
||||
|
||||
Reference in New Issue
Block a user