Skip to content

Commit

Permalink
[pinpoint-apm#9000] Backport: Fix incorrect funciton calls when webho…
Browse files Browse the repository at this point in the history
…ok.enable=false
  • Loading branch information
ga-ram committed Jul 26, 2022
1 parent f358745 commit 819734e
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public AlarmServiceImpl(AlarmDao alarmDao, WebhookSendInfoDao webhookSendInfoDao

@Override
public String insertRule(Rule rule) {
return alarmDao.insertRule(rule);
return alarmDao.insertRuleExceptWebhookSend(rule);
}

@Override
Expand Down Expand Up @@ -81,13 +81,14 @@ public List<Rule> selectRuleByApplicationId(String applicationId) {

@Override
public void updateRule(Rule rule) {
alarmDao.updateRule(rule);
alarmDao.updateRuleExceptWebhookSend(rule);
alarmDao.deleteCheckerResult(rule.getRuleId());
}

@Override
public void updateRuleWithWebhooks(Rule rule, List<String> webhookIds) {
updateRule(rule);
alarmDao.updateRule(rule);
alarmDao.deleteCheckerResult(rule.getRuleId());

List<WebhookSendInfo> oldListofWebhookInfos = webhookSendInfoDao.selectWebhookSendInfoByRuleId(rule.getRuleId());

Expand Down

0 comments on commit 819734e

Please sign in to comment.