mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-10-30 03:56:23 -05:00 
			
		
		
		
	Consume documents in order of increasing mtime
This increases overall usability, especially for multi-page scans. Previously, the consumption order was undefined (see os.listdir())
This commit is contained in:
		| @@ -71,8 +71,11 @@ class Consumer: | ||||
|         }) | ||||
|  | ||||
|     def run(self): | ||||
|         docs = [os.path.join(self.consume, entry) | ||||
|                 for entry in os.listdir(self.consume)] | ||||
|         docs_old_to_new = sorted(docs, key=lambda doc: os.path.getmtime(doc)) | ||||
|  | ||||
|         for doc in os.listdir(self.consume): | ||||
|         for doc in docs_old_to_new: | ||||
|  | ||||
|             doc = os.path.join(self.consume, doc) | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Erik Arvstedt
					Erik Arvstedt