A community-supported supercharged document management system: scan, index and archive all your documents
Python aiangulararchivingdjangodmsdocument-managementdocument-management-systemllmmachine-learningocroptical-character-recognitionpdf
Use os.scandir instead of os.listdir
Erik Arvstedta56a3eb86d7c
diff --git a/src/documents/consumer.py b/src/documents/consumer.pyindex 3d7cc7bd1..6f9273b03 100644--- a/src/documents/consumer.py+++ b/src/documents/consumer.py@@ -71,8 +71,7 @@ class Consumer:})def run(self):- docs = [os.path.join(self.consume, entry)- for entry in os.listdir(self.consume)]+ docs = [entry.path for entry in os.scandir(self.consume)]docs_old_to_new = sorted(docs, key=lambda doc: os.path.getmtime(doc))for doc in docs_old_to_new: