Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
熊鹏飞
/
xxljob220
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
7d9f6779
authored
Sep 16, 2018
by
xuxueli
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
GLUE脚本文件自动清理功能,及时清理过期脚本文件;
parent
34730653
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
4 deletions
doc/XXL-JOB官方文档.md
xxl-job-core/src/main/java/com/xxl/job/core/handler/impl/ScriptJobHandler.java
doc/XXL-JOB官方文档.md
View file @
7d9f6779
## 《分
布式任务调度平台XXL-JOB》
## 《分
布式任务调度平台XXL-JOB》
...
...
@@ -1241,8 +1241,9 @@ Tips: 历史版本(V1.3.x)目前已经Release至稳定版本, 进入维护阶段
-
25、任务调度备注中标注任务触发类型,如Cron触发、父任务触发、API触发等等,方便排查调度日志;
-
26、底层日志组件SimpleDateFormat线程安全问题修复;
-
27、执行器通讯线程优化,corePoolSize从256降低至32;
-
28、【迭代中】新增任务运行模式 "GLUE模式(PowerShell) ",支持PowerShell脚本任务;
-
29、【迭代中】分片任务失败重试优化,仅重试当前失败的分片;
-
28、新增任务运行模式 "GLUE模式(PowerShell) ",支持PowerShell脚本任务;
-
29、GLUE脚本文件自动清理功能,及时清理过期脚本文件;
-
30、【迭代中】分片任务失败重试优化,仅重试当前失败的分片;
### TODO LIST
...
...
xxl-job-core/src/main/java/com/xxl/job/core/handler/impl/ScriptJobHandler.java
View file @
7d9f6779
...
...
@@ -25,6 +25,20 @@ public class ScriptJobHandler extends IJobHandler {
this
.
glueUpdatetime
=
glueUpdatetime
;
this
.
gluesource
=
gluesource
;
this
.
glueType
=
glueType
;
// clean old script file
File
glueSrcPath
=
new
File
(
XxlJobFileAppender
.
getGlueSrcPath
());
if
(
glueSrcPath
.
exists
())
{
File
[]
glueSrcFileList
=
glueSrcPath
.
listFiles
();
if
(
glueSrcFileList
!=
null
&&
glueSrcFileList
.
length
>
0
)
{
for
(
File
glueSrcFileItem
:
glueSrcFileList
)
{
if
(
glueSrcFileItem
.
getName
().
startsWith
(
String
.
valueOf
(
jobId
)+
"_"
))
{
glueSrcFileItem
.
delete
();
}
}
}
}
}
public
long
getGlueUpdatetime
()
{
...
...
@@ -48,7 +62,10 @@ public class ScriptJobHandler extends IJobHandler {
.
concat
(
"_"
)
.
concat
(
String
.
valueOf
(
glueUpdatetime
))
.
concat
(
glueType
.
getSuffix
());
ScriptUtil
.
markScriptFile
(
scriptFileName
,
gluesource
);
File
scriptFile
=
new
File
(
scriptFileName
);
if
(!
scriptFile
.
exists
())
{
ScriptUtil
.
markScriptFile
(
scriptFileName
,
gluesource
);
}
// log file
String
logFileName
=
XxlJobFileAppender
.
contextHolder
.
get
();
...
...
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