Skip to content

Commit

Permalink
排查错误
Browse files Browse the repository at this point in the history
  • Loading branch information
woshiyanghai committed Jul 18, 2024
1 parent c34afc4 commit 6943368
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion sql/sql_workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ def execute(request):
sys_config = SysConfig()
if not request.user.is_superuser and on_query_low_peak_time_ddl(workflow_id) is False:
start = sys_config.get("query_low_peak_start", 0)
end = sys_config.get("query_low_peak_end", 0)
end = sys_config.get("query_low_peak_end", 24)
context = {
"errMsg": "管理员设置了业务低峰期时间范围:每天%s:00至%s,你只能在业务低峰时间范围执行DDL工单操作!" % (start, end)
}
Expand Down
4 changes: 2 additions & 2 deletions sql/utils/sql_review.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ def on_query_low_peak_time_ddl(workflow_id, run_date=None):
"""
config = SysConfig()
workflow_detail = SqlWorkflow.objects.get(id=workflow_id)
start = int(config.get("query_low_peak_start", ""))
end = int(config.get("query_low_peak_end", ""))
start = int(config.get("query_low_peak_start", 0))
end = int(config.get("query_low_peak_end", 24))
result = True
ctime = run_date or datetime.datetime.now()
hour = ctime.hour
Expand Down

0 comments on commit 6943368

Please sign in to comment.