Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
H
holmes
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
QA
holmes
Commits
d51f3da3
Commit
d51f3da3
authored
May 21, 2021
by
黎博
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加debug判断
parent
5d8c9a06
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
23 deletions
+29
-23
JiraToDingding.java
src/main/java/cn/qg/holmes/task/jira/JiraToDingding.java
+29
-23
No files found.
src/main/java/cn/qg/holmes/task/jira/JiraToDingding.java
View file @
d51f3da3
...
...
@@ -51,8 +51,13 @@ public class JiraToDingding {
}
}
@Scheduled
(
cron
=
"0 */1 * * * ?"
)
/**
* bug池里BUG循环
* @throws Exception
*/
@Scheduled
(
cron
=
"0 0 */1 1-5 * ?"
)
public
void
cycleJiraBugPool
()
throws
Exception
{
if
(
taskDebug
.
equals
(
"true"
))
{
log
.
info
(
"开始执行jira bug pool定时任务!"
);
QueryWrapper
<
JiraBugPool
>
jiraBugPoolQueryWrapper
=
new
QueryWrapper
<>();
jiraBugPoolQueryWrapper
.
eq
(
"enable"
,
1
);
...
...
@@ -70,11 +75,12 @@ public class JiraToDingding {
DateTime
endDate
=
issue
.
getUpdateDate
();
int
duration
=
jiraIssueService
.
calculateBugFixTime
(
startDate
,
endDate
);
log
.
info
(
"{} BUG持续时间:{}小时"
,
issue
.
getKey
(),
duration
);
DingdingUtils
.
sendToDingding
(
DingdingUtils
.
buildBugFixRemindMsg
(
issue
),
jiraBugPool
.
getDingUrl
());
//
DingdingUtils.sendToDingding(DingdingUtils.buildBugFixRemindMsg(issue), jiraBugPool.getDingUrl());
// 如果已超过4个小时,则发送钉钉通知
// if (duration >= 4) {
// DingdingUtils.sendToDingding(jiraBugPool.getSummary(), jiraBugPool.getDingUrl());
// }
if
(
duration
>=
4
)
{
DingdingUtils
.
sendToDingding
(
DingdingUtils
.
buildBugFixRemindMsg
(
issue
),
"https://oapi.dingtalk.com/robot/send?access_token=835663338d638e40daaf3ab358af741ef0680a826a962c91bedc53b149d85ee1"
);
}
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment