mirror of
https://github.com/simon987/od-database.git
synced 2025-12-13 23:09:01 +00:00
Bug when directory is empty with new file upload
This commit is contained in:
@@ -48,6 +48,7 @@ class TaskManager:
|
|||||||
logger.info("Uploading file list in small chunks")
|
logger.info("Uploading file list in small chunks")
|
||||||
filename = "./crawled/" + str(task_result.website_id) + ".json"
|
filename = "./crawled/" + str(task_result.website_id) + ".json"
|
||||||
CHUNK_SIZE = 1000000 * 10
|
CHUNK_SIZE = 1000000 * 10
|
||||||
|
if os.path.exists(filename):
|
||||||
with open(filename) as f:
|
with open(filename) as f:
|
||||||
chunk = f.read(CHUNK_SIZE)
|
chunk = f.read(CHUNK_SIZE)
|
||||||
while chunk:
|
while chunk:
|
||||||
|
|||||||
Reference in New Issue
Block a user