Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
ufo-app-web
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
zhangwenxue
6 years ago
Commit
64508f0e3fa1e35e11f9133bca72a85f505d0f05
1 parent
613973d4
feature(alipay): add logger for dingtalk request error
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletions
utils/alert-manager.js
utils/alert-manager.js
View file @
64508f0
...
...
@@ -2,6 +2,7 @@ const _ = require('lodash');
const
ddAlert
=
require
(
'./dingding-alert'
);
const
MIN_SEND_INTERVAL
=
10
*
1000
;
const
moment
=
require
(
'moment'
);
const
logger
=
global
.
yoho
.
logger
;
const
AlertManager
=
{
isAtAll
:
false
,
...
...
@@ -28,7 +29,10 @@ const AlertManager = {
return
agent
.
getMarkdownReport
();
}));
ddAlert
(
text
.
join
(
'\n'
),
_
.
uniq
(
ats
),
this
.
isAtAll
);
ddAlert
(
text
.
join
(
'\n'
),
_
.
uniq
(
ats
),
this
.
isAtAll
)
.
catch
(
e
=>
{
logger
.
warn
(
'AlertManager send dingtalk alert:'
,
e
);
});
this
.
lastSendTime
=
now
;
this
.
pendingAgents
=
{};
}
...
...
Please
register
or
login
to post a comment