Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix: Task notification plugin fails to send email notifications in production mode #1346

Conversation

Kathenae
Copy link
Contributor

Description

This PR addresses an issue with the task notification plugin that prevented it from sending email notifications as expected in production mode. Specifically, the plugin was able to send notifications when using the Send test email button on the configuration form of the webapp, but failed to do so when triggered via a signal on a processing node. Although not entirely certain, this behavior may be traced to the plugin's inability to read/write the .conf file when running on processing node instances.

Solution

To fix the issue, this PR refactors the plugin to use the plugin DataStore instead of the .conf file. This approach ensures that the plugin's configuration is accessible across all instances, allowing it to send email notifications as expected in both dev and production mode.

Changes

In terms of changes made, the load() and save() functions have been refactored to use the plugin DataStore to retrieve and save the configuration, respectively. This eliminates the need for the .conf file and ensures that the plugin works correctly

Tests

To confirm the fix, I tested the plugin locally in both dev and production environments and verified that email notifications are sent when tasks finish processing and when tasks fail during processing.

@pierotofy
Copy link
Member

Makes sense, thanks for the fix!

@pierotofy pierotofy merged commit 2cedf42 into OpenDroneMap:master May 22, 2023
@pete1019
Copy link

Is a new release needed for that? If so please do so.
Or is uninstalling and installing the addon again doing the trick? Thanks

@Kathenae Kathenae deleted the bugfix/task-notification-plugin-db-save branch May 22, 2023 07:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants