mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-10-30 03:56:23 -05:00 
			
		
		
		
	workaround for a bug in django-q: task results with too long names would not show up in the result lists.
This commit is contained in:
		| @@ -56,4 +56,4 @@ class UploadForm(forms.Form): | |||||||
|             async_task("documents.tasks.consume_file", |             async_task("documents.tasks.consume_file", | ||||||
|                        f.name, |                        f.name, | ||||||
|                        override_filename=original_filename, |                        override_filename=original_filename, | ||||||
|                        task_name=os.path.basename(original_filename)) |                        task_name=os.path.basename(original_filename)[:100]) | ||||||
|   | |||||||
| @@ -21,7 +21,7 @@ class Handler(FileSystemEventHandler): | |||||||
|             try: |             try: | ||||||
|                 async_task("documents.tasks.consume_file", |                 async_task("documents.tasks.consume_file", | ||||||
|                            file, |                            file, | ||||||
|                            task_name=os.path.basename(file)) |                            task_name=os.path.basename(file)[:100]) | ||||||
|             except Exception as e: |             except Exception as e: | ||||||
|                 # Catch all so that the consumer won't crash. |                 # Catch all so that the consumer won't crash. | ||||||
|                 logging.getLogger(__name__).error( |                 logging.getLogger(__name__).error( | ||||||
| @@ -71,7 +71,7 @@ class Command(BaseCommand): | |||||||
|             if entry.is_file(): |             if entry.is_file(): | ||||||
|                 async_task("documents.tasks.consume_file", |                 async_task("documents.tasks.consume_file", | ||||||
|                            entry.path, |                            entry.path, | ||||||
|                            task_name=os.path.basename(entry.path)) |                            task_name=os.path.basename(entry.path)[:100]) | ||||||
|  |  | ||||||
|         # Start the watchdog. Woof! |         # Start the watchdog. Woof! | ||||||
|         if settings.CONSUMER_POLLING > 0: |         if settings.CONSUMER_POLLING > 0: | ||||||
|   | |||||||
| @@ -286,7 +286,7 @@ class MailAccountHandler(LoggingMixin): | |||||||
|                     override_correspondent_id=correspondent.id if correspondent else None,  # NOQA: E501 |                     override_correspondent_id=correspondent.id if correspondent else None,  # NOQA: E501 | ||||||
|                     override_document_type_id=doc_type.id if doc_type else None,  # NOQA: E501 |                     override_document_type_id=doc_type.id if doc_type else None,  # NOQA: E501 | ||||||
|                     override_tag_ids=[tag.id] if tag else None, |                     override_tag_ids=[tag.id] if tag else None, | ||||||
|                     task_name=f"Mail: {att.filename}" |                     task_name=att.filename[:100] | ||||||
|                 ) |                 ) | ||||||
|  |  | ||||||
|                 processed_attachments += 1 |                 processed_attachments += 1 | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Jonas Winkler
					Jonas Winkler