Parcourir la source

新增任务运行模式 "GLUE模式(PowerShell) ",支持PowerShell脚本任务;

xuxueli il y a 6 ans
Parent
révision
347306536c

+ 4 - 13
xxl-job-admin/src/main/webapp/WEB-INF/template/jobinfo/jobinfo.index.ftl Voir le fichier

@@ -272,20 +272,11 @@ process.exit(0)
272 272
 <textarea class="glueSource_powershell" style="display:none;" >
273 273
 Write-Host "xxl-job: hello powershell"
274 274
 
275
-if($args.Count -eq 3) {
276
-	$executorparam = $args[0]
277
-	$shard_index = $args[1]
278
-	$shard_total = $args[2]
279
-} Else {
280
-	$executorparam = ""
281
-	$shard_index = $args[0]
282
-	$shard_total = $args[1]
283
-}
284
-
285 275
 Write-Host "${I18n.jobinfo_script_location}: " $MyInvocation.MyCommand.Definition
286
-Write-Host "${I18n.jobinfo_field_executorparam}: " $executorparam
287
-Write-Host "${I18n.jobinfo_shard_index}: " $shard_index
288
-Write-Host "${I18n.jobinfo_shard_total}: " $shard_total
276
+Write-Host "${I18n.jobinfo_field_executorparam}: "
277
+	if ($args.Count -gt 2) { $args[0..($args.Count-3)] }
278
+Write-Host "${I18n.jobinfo_shard_index}: " $args[$args.Count-2]
279
+Write-Host "${I18n.jobinfo_shard_total}: " $args[$args.Count-1]
289 280
 
290 281
 Write-Host "Good bye!"
291 282
 exit 0