Pre Merge pull request !50 from 莫立名/master

pull/50/MERGE
莫立名 2 years ago committed by Gitee
commit 20dec7009d
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

@ -519,6 +519,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_PYTHON3'==glueType){
$("#addModal .form textarea[name='glueSource']").val( $("#addModal .form .glueSource_python3").val() );
} else if ('GLUE_PHP'==glueType){
$("#addModal .form textarea[name='glueSource']").val( $("#addModal .form .glueSource_php").val() );
} else if ('GLUE_NODEJS'==glueType){

@ -130,7 +130,7 @@
<#elseif jobInfo.glueType == "GLUE_SHELL" >
<#assign glueTypeModeSrc = "${request.contextPath}/static/plugins/codemirror/mode/shell/shell.js" />
<#assign glueTypeIdeMode = "text/x-sh" />
<#elseif jobInfo.glueType == "GLUE_PYTHON" >
<#elseif jobInfo.glueType == "GLUE_PYTHON" || jobInfo.glueType == "GLUE_PYTHON3">
<#assign glueTypeModeSrc = "${request.contextPath}/static/plugins/codemirror/mode/python/python.js" />
<#assign glueTypeIdeMode = "text/x-python" />
<#elseif jobInfo.glueType == "GLUE_PHP" >

@ -283,6 +283,30 @@ import sys
print "xxl-job: hello python"
print "${I18n.jobinfo_script_location}", sys.argv[0]
print "${I18n.jobinfo_field_executorparam}", sys.argv[1]
print "${I18n.jobinfo_shard_index}", sys.argv[2]
print "${I18n.jobinfo_shard_total}", sys.argv[3]
<#--for i in range(1, len(sys.argv)):
time.sleep(1)
print "参数", i, sys.argv[i]-->
print "Good bye!"
exit(0)
<#--
import logging
logging.basicConfig(level=logging.DEBUG)
logging.info("脚本文件:" + sys.argv[0])
-->
</textarea>
<textarea class="glueSource_python3" style="display:none;" >
#!/usr/bin/python3
# -*- coding: UTF-8 -*-
import time
import sys
print "xxl-job: hello python"
print "${I18n.jobinfo_script_location}", sys.argv[0]
print "${I18n.jobinfo_field_executorparam}", sys.argv[1]
print "${I18n.jobinfo_shard_index}", sys.argv[2]

@ -9,6 +9,7 @@ public enum GlueTypeEnum {
GLUE_GROOVY("GLUE(Java)", false, null, null),
GLUE_SHELL("GLUE(Shell)", true, "bash", ".sh"),
GLUE_PYTHON("GLUE(Python)", true, "python", ".py"),
GLUE_PYTHON3("GLUE(Python3)", true, "python3", ".py"),
GLUE_PHP("GLUE(PHP)", true, "php", ".php"),
GLUE_NODEJS("GLUE(Nodejs)", true, "node", ".js"),
GLUE_POWERSHELL("GLUE(PowerShell)", true, "powershell", ".ps1");

Loading…
Cancel
Save