U 优化兼容性

pull/586/head
vapao 2022-07-13 14:24:45 +08:00
parent 7699a42708
commit cd03e67e5b
2 changed files with 2 additions and 1 deletions

View File

@ -34,7 +34,7 @@ class DeployRequest(models.Model, ModelMixin):
desc = models.CharField(max_length=255, null=True) desc = models.CharField(max_length=255, null=True)
status = models.CharField(max_length=2, choices=STATUS) status = models.CharField(max_length=2, choices=STATUS)
reason = models.CharField(max_length=255, null=True) reason = models.CharField(max_length=255, null=True)
version = models.CharField(max_length=50, null=True) version = models.CharField(max_length=100, null=True)
spug_version = models.CharField(max_length=50, null=True) spug_version = models.CharField(max_length=50, null=True)
plan = models.DateTimeField(null=True) plan = models.DateTimeField(null=True)
fail_host_ids = models.TextField(default='[]') fail_host_ids = models.TextField(default='[]')

View File

@ -115,6 +115,7 @@ def _do_sync(rds, task, host):
rds.publish(token, json.dumps({'key': host.id, 'data': '\r\n\x1b[36m### Executing ...\x1b[0m\r\n'})) rds.publish(token, json.dumps({'key': host.id, 'data': '\r\n\x1b[36m### Executing ...\x1b[0m\r\n'}))
with tempfile.NamedTemporaryFile(mode='w') as fp: with tempfile.NamedTemporaryFile(mode='w') as fp:
fp.write(host.pkey or AppSetting.get('private_key')) fp.write(host.pkey or AppSetting.get('private_key'))
fp.write('\n')
fp.flush() fp.flush()
flag = time.time() flag = time.time()