[Update] 修改运行命令名称 (#2140)

This commit is contained in:
老广
2018-12-11 11:09:46 +08:00
committed by GitHub
parent 76aadad6fe
commit 31356e825f
6 changed files with 20 additions and 6 deletions

View File

@@ -48,6 +48,9 @@ class CommandExecution(models.Model):
return False
return True
def get_hosts_names(self):
return ','.join(self.hosts.all().values_list('hostname', flat=True))
def run(self):
print('-'*10 + ' ' + ugettext('Task start') + ' ' + '-'*10)
self.date_start = timezone.now()