[Feature-3754][Alert] Alert module support service for other service invoke#3979
Merged
CalvinKirs merged 10 commits intoapache:alert_plugin_designfrom Nov 5, 2020
Merged
Conversation
Codecov Report
@@ Coverage Diff @@
## alert_plugin_design #3979 +/- ##
======================================================
Coverage ? 40.73%
Complexity ? 3011
======================================================
Files ? 490
Lines ? 22426
Branches ? 2664
======================================================
Hits ? 9136
Misses ? 12459
Partials ? 831 Continue to review full report at Codecov.
|
CalvinKirs
reviewed
Oct 28, 2020
dolphinscheduler-alert/src/main/java/org/apache/dolphinscheduler/alert/AlertServer.java
Outdated
Show resolved
Hide resolved
|
Kudos, SonarCloud Quality Gate passed!
|
a9a49db to
449cbbe
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
#3754
What is the purpose of the pull request
In this feature , Alert server is a message notification service , email and wechat is a plugin of this service . If you want send email message you can create an instance of email plugin in the alert group and then you can select the alert group in SqlTask . SqlTask can call the alert server api with this alert group arrguement to send the message.
So we need alert api to support other service invoke.
Now the alert service sends alarms abnormally by periodically scanning the records in table t_ds_alert. It is asynchronous.
In the SqlTask task case, the task need send message synchronous and the final running status of this task depends on whether the message is sent successfully. So the alert api need send messages synchronously.
the params of alert api :