Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
service-campaign
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Nguyen Ha
service-campaign
Commits
784e68cb
Commit
784e68cb
authored
Sep 12, 2019
by
Nguyen Ha
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add Lock Job
parent
f34fc537
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
src/main/java/com/viettel/campaign/job/CampaignJob.java
src/main/java/com/viettel/campaign/job/CampaignJob.java
+2
-0
No files found.
src/main/java/com/viettel/campaign/job/CampaignJob.java
View file @
784e68cb
...
...
@@ -4,6 +4,7 @@ import com.viettel.campaign.model.ccms_full.*;
import
com.viettel.campaign.service.*
;
import
com.viettel.campaign.utils.DateTimeUtil
;
import
lombok.extern.slf4j.Slf4j
;
import
net.javacrumbs.shedlock.core.SchedulerLock
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
java.text.SimpleDateFormat
;
...
...
@@ -41,6 +42,7 @@ public class CampaignJob {
// @Scheduled(fixedRate = 5000)
// @Transactional( propagation = Propagation.REQUIRED)
@SchedulerLock
(
name
=
"testTimer"
,
lockAtMostFor
=
20
*
1000
,
lockAtLeastFor
=
20
*
1000
)
public
void
process
()
{
log
.
info
(
Thread
.
currentThread
().
getName
()
+
" The Task executed at "
+
dateFormat
.
format
(
new
Date
()));
List
<
ProcessConfig
>
list
=
processConfigService
.
findAll
();
...
...
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