Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
X
XXL-JOB
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
靳帅
XXL-JOB
Commits
f5ebe8f7
提交
f5ebe8f7
authored
9月 01, 2017
作者:
Kevin
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
1.添加GLUE_NODEJS支持
上级
2d160021
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
9 个修改的文件
包含
27 行增加
和
3 行删除
+27
-3
jobcode.index.ftl
...rc/main/webapp/WEB-INF/template/jobcode/jobcode.index.ftl
+1
-0
jobinfo.index.ftl
...rc/main/webapp/WEB-INF/template/jobinfo/jobinfo.index.ftl
+11
-1
jobcode.index.1.js
xxl-job-admin/src/main/webapp/static/js/jobcode.index.1.js
+2
-0
jobinfo.index.1.js
xxl-job-admin/src/main/webapp/static/js/jobinfo.index.1.js
+4
-0
joblog.index.1.js
xxl-job-admin/src/main/webapp/static/js/joblog.index.1.js
+2
-0
javascript.js
...p/static/plugins/codemirror/mode/javascript/javascript.js
+0
-0
ExecutorBizImpl.java
.../main/java/com/xxl/job/core/biz/impl/ExecutorBizImpl.java
+2
-1
GlueTypeEnum.java
...ore/src/main/java/com/xxl/job/core/glue/GlueTypeEnum.java
+2
-1
ScriptJobHandler.java
.../java/com/xxl/job/core/handler/impl/ScriptJobHandler.java
+3
-0
没有找到文件。
xxl-job-admin/src/main/webapp/WEB-INF/template/jobcode/jobcode.index.ftl
浏览文件 @
f5ebe8f7
...
...
@@ -113,6 +113,7 @@
<script
src=
"${request.contextPath}/static/plugins/codemirror/mode/clike/clike.js"
></script>
<script
src=
"${request.contextPath}/static/plugins/codemirror/mode/shell/shell.js"
></script>
<script
src=
"${request.contextPath}/static/plugins/codemirror/mode/python/python.js"
></script>
<script
src=
"${request.contextPath}/static/plugins/codemirror/mode/javascript/javascript.js"
></script>
<script
src=
"${request.contextPath}/static/plugins/codemirror/addon/hint/show-hint.js"
></script>
<script
src=
"${request.contextPath}/static/plugins/codemirror/addon/hint/anyword-hint.js"
></script>
<script>
...
...
xxl-job-admin/src/main/webapp/WEB-INF/template/jobinfo/jobinfo.index.ftl
浏览文件 @
f5ebe8f7
...
...
@@ -233,7 +233,17 @@ logging.basicConfig(level=logging.DEBUG)
logging
.
info
("脚本文件:"
+
sys
.
argv
[
0
])
--
>
</textarea>
<textarea
class=
"glueSource_nodejs"
style=
"display:none;"
>
// #!/usr/bin/node
console.log("xxl-job: hello nodejs")
var arguments = process.argv
console.log("脚本文件: " + arguments[1])
for (var i = 2; i
<
arguments
.
length
;
i
++){
console
.
log
("参数
:
%
s
,
%
s
",
i
,
arguments
[
i
]);
}
console
.
log
("
Good
bye
!")
process
.
exit
(
0
)
</
textarea
>
</form>
</div>
</div>
...
...
xxl-job-admin/src/main/webapp/static/js/jobcode.index.1.js
浏览文件 @
f5ebe8f7
...
...
@@ -16,6 +16,8 @@ $(function() {
ideMode
=
"text/x-sh"
;
}
else
if
(
'GLUE_PYTHON'
==
glueType
){
ideMode
=
"text/x-python"
;
}
else
if
(
'GLUE_NODEJS'
==
glueType
){
ideMode
=
"text/javascript"
}
codeEditor
=
CodeMirror
(
document
.
getElementById
(
"ideWindow"
),
{
...
...
xxl-job-admin/src/main/webapp/static/js/jobinfo.index.1.js
浏览文件 @
f5ebe8f7
...
...
@@ -55,6 +55,8 @@ $(function() {
return
"GLUE模式(Shell)"
;
}
else
if
(
'GLUE_PYTHON'
==
row
.
glueType
)
{
return
"GLUE模式(Python)"
;
}
else
if
(
'GLUE_NODEJS'
==
row
.
glueType
){
return
"GLUE模式(Nodejs)"
;
}
else
if
(
'BEAN'
==
row
.
glueType
)
{
return
"BEAN模式:"
+
row
.
executorHandler
;
}
...
...
@@ -341,6 +343,8 @@ $(function() {
$
(
"#addModal .form textarea[name='glueSource']"
).
val
(
$
(
"#addModal .form .glueSource_shell"
).
val
()
);
}
else
if
(
'GLUE_PYTHON'
==
glueType
){
$
(
"#addModal .form textarea[name='glueSource']"
).
val
(
$
(
"#addModal .form .glueSource_python"
).
val
()
);
}
else
if
(
'GLUE_NODEJS'
==
glueType
){
$
(
"#addModal .form textarea[name='glueSource']"
).
val
(
$
(
"#addModal .form .glueSource_nodejs"
).
val
()
);
}
});
...
...
xxl-job-admin/src/main/webapp/static/js/joblog.index.1.js
浏览文件 @
f5ebe8f7
...
...
@@ -105,6 +105,8 @@ $(function() {
glueTypeTitle
=
"GLUE模式(Shell)"
;
}
else
if
(
'GLUE_PYTHON'
==
row
.
glueType
)
{
glueTypeTitle
=
"GLUE模式(Python)"
;
}
else
if
(
'GLUE_NODEJS'
==
row
.
glueType
)
{
glueTypeTitle
=
"GLUE模式(Nodejs)"
;
}
else
if
(
'BEAN'
==
row
.
glueType
)
{
glueTypeTitle
=
"BEAN模式:"
+
row
.
executorHandler
;
}
...
...
xxl-job-admin/src/main/webapp/static/plugins/codemirror/mode/javascript/javascript.js
0 → 100644
浏览文件 @
f5ebe8f7
差异被折叠。
点击展开。
xxl-job-core/src/main/java/com/xxl/job/core/biz/impl/ExecutorBizImpl.java
浏览文件 @
f5ebe8f7
...
...
@@ -120,7 +120,8 @@ public class ExecutorBizImpl implements ExecutorBiz {
}
}
}
else
if
(
GlueTypeEnum
.
GLUE_SHELL
==
GlueTypeEnum
.
match
(
triggerParam
.
getGlueType
())
||
GlueTypeEnum
.
GLUE_PYTHON
==
GlueTypeEnum
.
match
(
triggerParam
.
getGlueType
())
)
{
||
GlueTypeEnum
.
GLUE_PYTHON
==
GlueTypeEnum
.
match
(
triggerParam
.
getGlueType
())
||
GlueTypeEnum
.
GLUE_NODEJS
==
GlueTypeEnum
.
match
(
triggerParam
.
getGlueType
()))
{
// valid old jobThread
if
(
jobThread
!=
null
&&
...
...
xxl-job-core/src/main/java/com/xxl/job/core/glue/GlueTypeEnum.java
浏览文件 @
f5ebe8f7
...
...
@@ -8,7 +8,8 @@ public enum GlueTypeEnum {
BEAN
(
"BEAN模式"
),
GLUE_GROOVY
(
"GLUE模式(Java)"
),
GLUE_SHELL
(
"GLUE模式(Shell)"
),
GLUE_PYTHON
(
"GLUE模式(Python)"
);
GLUE_PYTHON
(
"GLUE模式(Python)"
),
GLUE_NODEJS
(
"GLUE模式(Nodejs)"
);
private
String
desc
;
private
GlueTypeEnum
(
String
desc
)
{
...
...
xxl-job-core/src/main/java/com/xxl/job/core/handler/impl/ScriptJobHandler.java
浏览文件 @
f5ebe8f7
...
...
@@ -40,6 +40,9 @@ public class ScriptJobHandler extends IJobHandler {
}
else
if
(
GlueTypeEnum
.
GLUE_PYTHON
==
glueType
)
{
cmd
=
"python"
;
scriptFileName
=
XxlJobFileAppender
.
logPath
.
concat
(
"gluesource/"
).
concat
(
String
.
valueOf
(
jobId
)).
concat
(
"_"
).
concat
(
String
.
valueOf
(
glueUpdatetime
)).
concat
(
".py"
);
}
else
if
(
GlueTypeEnum
.
GLUE_NODEJS
==
glueType
)
{
cmd
=
"node"
;
scriptFileName
=
XxlJobFileAppender
.
logPath
.
concat
(
"gluesource/"
).
concat
(
String
.
valueOf
(
jobId
)).
concat
(
"_"
).
concat
(
String
.
valueOf
(
glueUpdatetime
)).
concat
(
".js"
);
}
// make script file
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论