Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
baihang-report
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
data-spider
baihang-report
Commits
f76cf991
Commit
f76cf991
authored
Aug 06, 2021
by
陈宏杰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
测试环境不跑定时任务
parent
fbc83fa8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
QuantGroupZhuDaiReportToBaiHang.java
...uantgroup/report/job/QuantGroupZhuDaiReportToBaiHang.java
+7
-1
No files found.
src/main/java/cn/quantgroup/report/job/QuantGroupZhuDaiReportToBaiHang.java
View file @
f76cf991
...
@@ -8,8 +8,8 @@ import com.google.common.base.Stopwatch;
...
@@ -8,8 +8,8 @@ import com.google.common.base.Stopwatch;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.data.redis.core.RedisTemplate
;
import
org.springframework.data.redis.core.RedisTemplate
;
import
org.springframework.scheduling.annotation.Async
;
import
org.springframework.scheduling.annotation.Scheduled
;
import
org.springframework.scheduling.annotation.Scheduled
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
...
@@ -43,10 +43,16 @@ public class QuantGroupZhuDaiReportToBaiHang {
...
@@ -43,10 +43,16 @@ public class QuantGroupZhuDaiReportToBaiHang {
@Autowired
@Autowired
private
DingTalk
dingTalk
;
private
DingTalk
dingTalk
;
@Value
(
"${isDebug}"
)
private
Boolean
isDebug
;
// @Async
// @Async
//@Scheduled(cron = "0 0 05 * * ?")
//@Scheduled(cron = "0 0 05 * * ?")
@Scheduled
(
cron
=
"0 0 03 * * ?"
)
@Scheduled
(
cron
=
"0 0 03 * * ?"
)
public
void
startZhuDaiReport
(){
public
void
startZhuDaiReport
(){
if
(
isDebug
){
//测试环境不跑定时任务
return
;
}
if
(
increment
()){
if
(
increment
()){
redisTemplate
.
expire
(
Constant
.
QG_ZHU_DAI_REPORT_LOCK_KEY
,
10
,
TimeUnit
.
SECONDS
);
redisTemplate
.
expire
(
Constant
.
QG_ZHU_DAI_REPORT_LOCK_KEY
,
10
,
TimeUnit
.
SECONDS
);
...
...
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