Skip to content

Commit

Permalink
rds会话管理开关配置
Browse files Browse the repository at this point in the history
  • Loading branch information
hhyo committed Jun 15, 2018
1 parent db5000e commit 46c2937
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions sql/views_ajax.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,10 @@
import logging
from .workflow import Workflow
from .extend_json_encoder import ExtendJSONEncoder
from .aliyun_function import process_status as aliyun_process_status, \
create_kill_session as aliyun_create_kill_session, kill_session as aliyun_kill_session

if settings.ALIYUN_RDS_MANAGE:
from .aliyun_function import process_status as aliyun_process_status, \
create_kill_session as aliyun_create_kill_session, kill_session as aliyun_kill_session

logger = logging.getLogger('default')
mailSender = MailSender()
Expand Down Expand Up @@ -486,7 +488,9 @@ def workflowlist(request):

result = {"total": auditlistCount, "rows": rows}
# 返回查询结果
return HttpResponse(json.dumps(result, cls=ExtendJSONEncoder, bigint_as_string=True), content_type='application/json')
return HttpResponse(json.dumps(result, cls=ExtendJSONEncoder, bigint_as_string=True),
content_type='application/json')


# 问题诊断--进程列表
@csrf_exempt
Expand Down Expand Up @@ -564,4 +568,4 @@ def kill_session(request):
prpCryptor.decrypt(master_info.master_password), 'information_schema', kill_sql)

# 返回查询结果
return HttpResponse(json.dumps(result), content_type='application/json')
return HttpResponse(json.dumps(result), content_type='application/json')

0 comments on commit 46c2937

Please sign in to comment.