You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@streampark.apache.org by GitBox <gi...@apache.org> on 2022/09/13 05:21:35 UTC
[GitHub] [incubator-streampark] 1996fanrui opened a new pull request, #1586: [Improve] Sender Email takes effect immediately when the configuration is modified
1996fanrui opened a new pull request, #1586:
URL: https://github.com/apache/incubator-streampark/pull/1586
### What problem does this PR solve?
Issue Number: close #1562
Problem Summary:
The sender email does't work with the latest configuration.
Sender Email takes effect immediately when the configuration is modified after this PR. And `SettingServiceImpl#getSenderEmail()` only accesses memory and not database, so the performance is ok.
### What is changed and how it works?
Proposal: [xxx](url) <!-- REMOVE this line if not applicable -->
Feel free to ping committers for the review!
## Contribution Checklist
- Make sure that the pull request corresponds to a [GITHUB issue](https://github.com/apache/streampark/issues).
- Name the pull request in the form "[Feature] [component] Title of the pull request", where *Feature* can be replaced by `Hotfix`, `Bug`, etc.
- Minor fixes should be named following this pattern: `[hotfix] [docs] Fix typo in README.md doc`.
## Purpose of this pull request
The sender email does't work with the latest configuration.
Sender Email takes effect immediately when the configuration is modified after this PR.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@streampark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-streampark] lvshaokang commented on a diff in pull request #1586: [Improve] Sender Email takes effect immediately when the configuration is modified
Posted by GitBox <gi...@apache.org>.
lvshaokang commented on code in PR #1586:
URL: https://github.com/apache/incubator-streampark/pull/1586#discussion_r969203862
##########
streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/alert/impl/EmailAlertNotifyServiceImpl.java:
##########
@@ -58,21 +56,19 @@ public void loadTemplateFile() throws Exception {
@Override
public boolean doAlert(AlertConfigWithParams alertConfig, AlertTemplate template) throws AlertException {
- if (this.senderEmail == null) {
- this.senderEmail = settingService.getSenderEmail();
- }
- if (this.senderEmail == null) {
+ SenderEmail senderEmail = settingService.getSenderEmail();
Review Comment:
```suggestion
SenderEmail senderEmail = Optional.ofNullable(settingService.getSenderEmail()).orElseThrow()
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@streampark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-streampark] 1996fanrui commented on a diff in pull request #1586: [Improve] Sender Email takes effect immediately when the configuration is modified
Posted by GitBox <gi...@apache.org>.
1996fanrui commented on code in PR #1586:
URL: https://github.com/apache/incubator-streampark/pull/1586#discussion_r969238541
##########
streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/alert/impl/EmailAlertNotifyServiceImpl.java:
##########
@@ -58,21 +56,19 @@ public void loadTemplateFile() throws Exception {
@Override
public boolean doAlert(AlertConfigWithParams alertConfig, AlertTemplate template) throws AlertException {
- if (this.senderEmail == null) {
- this.senderEmail = settingService.getSenderEmail();
- }
- if (this.senderEmail == null) {
+ SenderEmail senderEmail = settingService.getSenderEmail();
Review Comment:
Thanks for your review, addressed.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@streampark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-streampark] wolfboys merged pull request #1586: [Improve] Sender Email takes effect immediately when the configuration is modified
Posted by GitBox <gi...@apache.org>.
wolfboys merged PR #1586:
URL: https://github.com/apache/incubator-streampark/pull/1586
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@streampark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org