Skip to content

Commit

Permalink
refactor: fixed delay issue in alert
Browse files Browse the repository at this point in the history
  • Loading branch information
mrrishimeena committed Aug 30, 2024
1 parent eef7965 commit cfc19d5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/main/server/utils/alerts.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ SlackService.sendAlert = async function (message, type, messageExtraInfo, errsol
let alertUrl;
if (alertUrlData && alertUrlData.item && errsoleLogId) {
const parsedAlertUrlValue = JSON.parse(alertUrlData.item.value);
alertUrl = parsedAlertUrlValue.url + '#/logs?errsole_log_id=' + errsoleLogId + '&timestamp=' + new Date(new Date().getTime() + 1000).toISOString();
alertUrl = parsedAlertUrlValue.url + '#/logs?errsole_log_id=' + errsoleLogId + '&timestamp=' + new Date(new Date().getTime() + 2000).toISOString();
}
const webhookUrl = parsedValue.url;
const payload = blockKit(message, type, messageExtraInfo, alertUrl);
Expand Down Expand Up @@ -162,7 +162,7 @@ EmailService.sendAlert = async function (message, type, messageExtraInfo, errsol
let alertUrl;
if (alertUrlData && alertUrlData.item && errsoleLogId) {
const parsedAlertUrlValue = JSON.parse(alertUrlData.item.value);
alertUrl = parsedAlertUrlValue.url + '#/logs?errsole_log_id=' + errsoleLogId + '&timestamp=' + new Date(new Date().getTime() + 1000).toISOString();
alertUrl = parsedAlertUrlValue.url + '#/logs?errsole_log_id=' + errsoleLogId + '&timestamp=' + new Date(new Date().getTime() + 2000).toISOString();
}
// Construct the email subject and message
let subject;
Expand Down

0 comments on commit cfc19d5

Please sign in to comment.