feat: 支持pyhton脚本

pull/9248/head
Aaron3S 2022-12-27 15:04:43 +08:00
parent 1b9aad594c
commit ddca4dce41
1 changed files with 4 additions and 5 deletions

View File

@ -165,12 +165,11 @@ class JobExecution(JMSOrgBaseModel):
if self.current_job.type != 'adhoc':
return
result = self.current_job.args
result += " chdir={}".format(self.current_job.chdir)
if self.current_job.chdir:
result += " chdir={}".format(self.current_job.chdir)
if self.current_job.module in ['python']:
result += " executable={}".format(self.current_job.module)
print(result)
return self.job.args
return result
def get_runner(self):
inv = self.current_job.inventory
@ -238,7 +237,7 @@ class JobExecution(JMSOrgBaseModel):
@property
def is_finished(self):
return self.status in [JobStatus.success, JobStatus.failed]
return self.status in [JobStatus.success, JobStatus.failed, JobStatus.timeout]
@property
def is_success(self):