From 7d333ee866bd49906a8121c80082cd1210247801 Mon Sep 17 00:00:00 2001 From: vapao Date: Tue, 7 Sep 2021 15:13:14 +0800 Subject: [PATCH] fix issue --- spug_api/apps/deploy/views.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/spug_api/apps/deploy/views.py b/spug_api/apps/deploy/views.py index 770d3cf..2d2fd05 100644 --- a/spug_api/apps/deploy/views.py +++ b/spug_api/apps/deploy/views.py @@ -134,11 +134,10 @@ class RequestDetailView(View): outputs['local'] = {'id': 'local', 'data': ''} if req.deploy.extend == '2': outputs['local'] = {'id': 'local', 'data': f'{human_time()} 读取数据... '} - if req.deploy.extend == '2': - response['s_actions'] = json.loads(req.deploy.extend_obj.server_actions) - response['h_actions'] = json.loads(req.deploy.extend_obj.host_actions) - if not response['h_actions']: - response['outputs'] = {'local': outputs['local']} + response['s_actions'] = json.loads(req.deploy.extend_obj.server_actions) + response['h_actions'] = json.loads(req.deploy.extend_obj.host_actions) + if not response['h_actions']: + response['outputs'] = {'local': outputs['local']} rds, key, counter = get_redis_connection(), f'{settings.REQUEST_KEY}:{r_id}', 0 data = rds.lrange(key, counter, counter + 9) while data: