mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-10-30 03:56:23 -05:00 
			
		
		
		
	small changes
This commit is contained in:
		| @@ -223,9 +223,9 @@ class Consumer(LoggingMixin): | |||||||
|                 self.log("debug", "Deleting file {}".format(self.path)) |                 self.log("debug", "Deleting file {}".format(self.path)) | ||||||
|                 os.unlink(self.path) |                 os.unlink(self.path) | ||||||
|         except Exception as e: |         except Exception as e: | ||||||
|             raise ConsumerError(e) |             self._send_progress(self.filename, 100, 100, 'FAILED', | ||||||
|             self._send_progress(file, 100, 100, 'FAILED', |  | ||||||
|                                 "Failed: {}".format(e)) |                                 "Failed: {}".format(e)) | ||||||
|  |             raise ConsumerError(e) | ||||||
|         finally: |         finally: | ||||||
|             document_parser.cleanup() |             document_parser.cleanup() | ||||||
|  |  | ||||||
| @@ -234,7 +234,7 @@ class Consumer(LoggingMixin): | |||||||
|             "Document {} consumption finished".format(document) |             "Document {} consumption finished".format(document) | ||||||
|         ) |         ) | ||||||
|  |  | ||||||
|         self._send_progress(file, 100, 100, 'SUCCESS', |         self._send_progress(self.filename, 100, 100, 'SUCCESS', | ||||||
|                             'Finished.', document.id) |                             'Finished.', document.id) | ||||||
|  |  | ||||||
|         return document |         return document | ||||||
|   | |||||||
| @@ -143,6 +143,15 @@ TEMPLATES = [ | |||||||
|     }, |     }, | ||||||
| ] | ] | ||||||
|  |  | ||||||
|  | CHANNEL_LAYERS = { | ||||||
|  |     "default": { | ||||||
|  |         "BACKEND": "channels_redis.core.RedisChannelLayer", | ||||||
|  |         "CONFIG": { | ||||||
|  |             "hosts": ["redis://localhost:6379"], | ||||||
|  |         }, | ||||||
|  |     }, | ||||||
|  | } | ||||||
|  |  | ||||||
| ############################################################################### | ############################################################################### | ||||||
| # Security                                                                    # | # Security                                                                    # | ||||||
| ############################################################################### | ############################################################################### | ||||||
| @@ -376,12 +385,3 @@ for t in json.loads(os.getenv("PAPERLESS_FILENAME_PARSE_TRANSFORMS", "[]")): | |||||||
| # TODO: this should not have a prefix. | # TODO: this should not have a prefix. | ||||||
| # Specify the filename format for out files | # Specify the filename format for out files | ||||||
| PAPERLESS_FILENAME_FORMAT = os.getenv("PAPERLESS_FILENAME_FORMAT") | PAPERLESS_FILENAME_FORMAT = os.getenv("PAPERLESS_FILENAME_FORMAT") | ||||||
|  |  | ||||||
| CHANNEL_LAYERS = { |  | ||||||
|     "default": { |  | ||||||
|         "BACKEND": "channels_redis.core.RedisChannelLayer", |  | ||||||
|         "CONFIG": { |  | ||||||
|             "hosts": [("broker", 6379)], |  | ||||||
|         }, |  | ||||||
|     }, |  | ||||||
| } |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Jonas Winkler
					Jonas Winkler