Skip to content

Commit

Permalink
be - preprocess - fix path limit crash
Browse files Browse the repository at this point in the history
  • Loading branch information
slatinsky committed Sep 1, 2024
1 parent 9694457 commit ca633b7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/dcef/backend/fastapi/prod.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@

if __name__ == "__main__":
multiprocessing.freeze_support() # for windows https://stackoverflow.com/a/67590514
uvicorn.run("src.main:app", host="0.0.0.0", port=58000, reload=False, workers=4)
uvicorn.run("src.main:app", host="0.0.0.0", port=58000, reload=False, workers=1, loop="asyncio")
6 changes: 5 additions & 1 deletion src/dcef/backend/preprocess/JsonProcessor.py
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,11 @@ def mark_as_processed(self, json_path):
json_path_with_base_dir = self.file_finder.add_base_directory(json_path)

# get file size
file_size = os.path.getsize(json_path_with_base_dir)
try:
file_size = os.path.getsize(json_path_with_base_dir)
except FileNotFoundError:
print(f' ERROR: FileNotFoundError - path is probably longer than 260 chars')
file_size = 0

# get date modified
date_modified = os.path.getmtime(json_path_with_base_dir)
Expand Down
Empty file.

0 comments on commit ca633b7

Please sign in to comment.