* [Update] 修改command Post导致的output错误和定时任务创建问题

* [Update] 修改celery 日志

* [Update] 修改task日志方式

* [Update] 修改Docker file
This commit is contained in:
老广
2019-01-15 10:23:30 +08:00
committed by GitHub
parent 50c1b3ed4a
commit d026b31c9f
31 changed files with 567 additions and 344 deletions

View File

@@ -8,6 +8,8 @@ from django.utils.translation import ugettext_lazy as _
from django.utils.translation import ugettext
from django.db import models
from orgs.models import Organization
from ..ansible.runner import CommandRunner
from ..inventory import JMSInventory
@@ -53,6 +55,8 @@ class CommandExecution(models.Model):
def run(self):
print('-'*10 + ' ' + ugettext('Task start') + ' ' + '-'*10)
org = Organization.get_instance(self.run_as.org_id)
org.change_to()
self.date_start = timezone.now()
ok, msg = self.run_as.is_command_can_run(self.command)
if ok: