Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
byit-myth-job
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
liyuan
byit-myth-job
Commits
d2d5b896
Commit
d2d5b896
authored
Mar 11, 2020
by
huangfusuper
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
任务扫描线程重构
parent
3c2cf5f5
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
19 deletions
+9
-19
MythJobScheduler.java
...in-core/src/main/java/com/byit/conf/MythJobScheduler.java
+9
-19
No files found.
byit-myth-core/myth-admin-core/src/main/java/com/byit/conf/MythJobScheduler.java
View file @
d2d5b896
package
com
.
byit
.
conf
;
import
com.byit.factory.DaemonScanThreadRunHelper
;
import
com.byit.thread.*
;
import
com.byit.util.SpringUtil
;
import
com.byit.thread.BaseThreadRunHelper
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.DisposableBean
;
import
org.springframework.beans.factory.InitializingBean
;
...
...
@@ -22,48 +21,39 @@ import java.util.Map;
@Slf4j
public
class
MythJobScheduler
implements
InitializingBean
,
DisposableBean
{
private
final
JobScheduleHelper
jobScheduleHelper
;
private
final
LogScanHelper
logScanHelper
;
private
final
RunRecordingScanHelper
runRecordingScanHelper
;
/**
* private final JobScheduleHelper jobScheduleHelper
* private final EmailScanHelper emailScanHelper
* private final FlowScanHelper flowScanHelper
* private final LogScanHelper logScanHelper
* private final RunRecordingScanHelper runRecordingScanHelper
*/
private
final
ApplicationContext
applicationContext
;
@Autowired
public
MythJobScheduler
(
JobScheduleHelper
jobScheduleHelper
,
LogScanHelper
logScanHelper
,
RunRecordingScanHelper
runRecordingScanHelper
,
ApplicationContext
applicationContext
)
{
this
.
jobScheduleHelper
=
jobScheduleHelper
;
this
.
logScanHelper
=
logScanHelper
;
this
.
runRecordingScanHelper
=
runRecordingScanHelper
;
public
MythJobScheduler
(
ApplicationContext
applicationContext
)
{
this
.
applicationContext
=
applicationContext
;
}
/**
* 销毁方法
* @throws Exception
*/
@Override
public
void
destroy
()
throws
Exception
{
public
void
destroy
()
{
DaemonScanThreadRunHelper
.
logoutThreadGroup
();
this
.
jobScheduleHelper
.
doStop
();
this
.
logScanHelper
.
doStop
();
this
.
runRecordingScanHelper
.
doStop
();
}
/**
* 初始化方法
* @throws Exception
*/
@Override
public
void
afterPropertiesSet
()
throws
Exception
{
public
void
afterPropertiesSet
()
{
helperAutoAdd
();
//启用扫描线程
DaemonScanThreadRunHelper
.
runDaemonThreads
();
this
.
jobScheduleHelper
.
start
();
this
.
logScanHelper
.
start
();
this
.
runRecordingScanHelper
.
start
();
}
/**
...
...
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