FeatureFuel
1

Retry failed workflow email actions and surface failures in the UI

Source: paperless-ngx/paperless-ngx#14684 · opened by @quantx-heiko
Description Workflow email actions are currently sent synchronously and exactly once (execute_email_action in documents/workflows/actions.py). Any exception is caught and only written to the log. The workflow then continues with its remaining actions. In practice, a transient problem (in my case a brief DNS outage, socket.gaierror: [Errno -3] Temporary failure in name resolution) causes the email to be silently lost. Subsequent actions still run, e.g. a tag marking the document as “sent to accountant”, so the document’s state ends up wrong. The user only finds out by reading the container logs. Proposal 1. Move the actual sending into a Celery task (e.g. send_workflow_email), analogous to send_webhook, with automatic retries for transient errors: Note that socket.gaierror and connection errors are subclasses of OSError. 2. Register the task in TRACKED_TASKS with a new PaperlessTask.TaskType (e.g. SEND_EMAIL). When all retries are exhausted, the failure then shows up …

No pledges yet. Be the first to back this.

Make a pledge

Pledge your monetary support if this feature is added.

$

Comments

No comments yet.

Replying to

Add a comment

What do you think about this feature request?


Similar requests