Skip to content

Commit

Permalink
rebase master
Browse files Browse the repository at this point in the history
  • Loading branch information
hhyo committed Nov 25, 2023
1 parent 0b6cdb2 commit a43e2b0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion sql/notify.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
)
from sql.utils.resource_group import auth_group_users
from sql.utils.workflow_audit import Audit
from sql_api.serializers import (
from sql_api.serializers.serializers import (
WorkflowContentSerializer,
WorkflowAuditListSerializer,
QueryPrivilegesApplySerializer,
Expand Down
8 changes: 5 additions & 3 deletions sql_api/serializers/sql_workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
from rest_framework import serializers

from common.config import SysConfig
from common.utils.const import WorkflowDict
from sql.engines import ReviewSet, get_engine
from sql.engines.models import ReviewResult
from sql.models import Instance, SqlWorkflow, Users
Expand Down Expand Up @@ -256,7 +255,9 @@ def mysql_osc_control(obj, sqlsha1, command):
"""用于MySQL的大表DDL控制"""
execute_engine = get_engine(instance=obj.instance)
try:
execute_result = execute_engine.osc_control(command=command, sqlsha1=sqlsha1)
execute_result = execute_engine.osc_control(
command=command, sqlsha1=sqlsha1
)
rows = execute_result.to_dict()
error = execute_result.error
except Exception as e:
Expand Down Expand Up @@ -296,5 +297,6 @@ class SqlWorkflowMySQLOscControlSerializer(serializers.Serializer):
label="SQL审核返回的sqlsha1信息",
)
command = serializers.ChoiceField(
choices=["get", "pause", "resume", "kill"], label="命令:get-获取详情,pause-暂停,resume-恢复,kill-终止"
choices=["get", "pause", "resume", "kill"],
label="命令:get-获取详情,pause-暂停,resume-恢复,kill-终止",
)

0 comments on commit a43e2b0

Please sign in to comment.