diff --git a/app/tasks/finalize_document_storage.py b/app/tasks/finalize_document_storage.py index b0c76db4..e81a4be3 100644 --- a/app/tasks/finalize_document_storage.py +++ b/app/tasks/finalize_document_storage.py @@ -37,9 +37,12 @@ def finalize_document_storage(original_file: str, processed_file: str, metadata: configured_destinations = ["configured destinations"] # 2) Enqueue uploads to all destinations (Dropbox, Nextcloud, Paperless) + # Note: send_to_all_destinations is asynchronous and queues upload tasks send_to_all_destinations.delay(processed_file) # 3) Send notification about successful file processing + # Note: This notification is sent after processing is complete but while uploads + # are being queued. The message reflects that uploads are being initiated. try: # Get file information file_size = os.path.getsize(processed_file) if os.path.exists(processed_file) else 0 diff --git a/app/utils/notification.py b/app/utils/notification.py index e0347d8a..d96a77bc 100644 --- a/app/utils/notification.py +++ b/app/utils/notification.py @@ -209,7 +209,7 @@ Document Type: {doc_type} Tags: {tags_str} Destinations: {destinations_str} -The file has been successfully processed and uploaded to all configured destinations. +The file has been successfully processed and is being uploaded to all configured destinations. """ return send_notification( diff --git a/docs/NotificationsSetup.md b/docs/NotificationsSetup.md index cc0f3c51..472ffccf 100644 --- a/docs/NotificationsSetup.md +++ b/docs/NotificationsSetup.md @@ -97,7 +97,7 @@ Document Type: Invoice Tags: financial, vendor-acme, urgent Destinations: Dropbox, Google Drive, Paperless-ngx -The file has been successfully processed and uploaded to all configured destinations. +The file has been successfully processed and is being uploaded to all configured destinations. ``` ## Automated Credential Checking