Add Email Notification Logic #2837
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR introduces functionality to send an email notification whenever a workflow transitions from a running state to a non-running state (e.g.,
Completed,Failed,Killed, orPaused). This feature was requested by the bioinformatics team at Cornell University to facilitate their long-running workflows. They wanted to be notified once the execution of their workflow is finished.Implementation Details
A new
sendWorkflowStatusEmailmethod has been added to handle the construction of the email notification, which includes details such as the workflow ID, name, state, timestamp, and a link to the dashboard. This method is triggered on the frontend whenever it detects a status change from the backend.Setup
To enable this functionality, update the following parameters in the core/amber/src/main/resources/application.conf file:
user-sys.enabledto true.user-sys.google.clientIdto your Google API client ID.user-sys.google.smtp.gmailto your Gmail ID (ensure that IMAP is enabled for this account).user-sys.google.smtp.passwordto your Gmail password.Screen.Recording.2024-09-16.at.10.30.57.AM.mov