Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wsmonitor_sql
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
宋鹏博
wsmonitor_sql
Commits
42420469
Commit
42420469
authored
Nov 20, 2025
by
宋鹏博
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改监控阈值
parent
7d6f8b69
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
6 deletions
+12
-6
cutils.py
common/cutils.py
+12
-6
No files found.
common/cutils.py
View file @
42420469
...
...
@@ -44,11 +44,12 @@ def mk_error_message(error_editor, error_answer, message_id, url=wechaturl):
requests
.
post
(
url
,
json
=
data
)
def
task_count
(
semantics_task_count
,
ideology_task_count
,
url
=
wechaturl
):
def
task_count
(
semantics_task_count
,
ideology_task_count
,
validate_logic_task_count
,
knowledge_task_count
,
url
=
wechaturl
):
data
=
{
"msgtype"
:
"markdown"
,
"markdown"
:
{
"content"
:
f
"审校任务排队情况<font color=
\"
warning
\"
>异常</font>,请相关同事注意。
\n
>语义任务:<font color=
\"
comment
\"
>{semantics_task_count}</font>
\n
内容风险任务:<font color=
\"
comment
\"
>{ideology_task_count}</font> "
"content"
:
f
"审校任务排队情况<font color=
\"
warning
\"
>异常</font>,请相关同事注意。
\n
>语义任务:<font color=
\"
comment
\"
>{semantics_task_count}</font>
\n
内容风险任务:<font color=
\"
comment
\"
>{ideology_task_count}</font>
\n
逻辑检查任务:<font color=
\"
comment
\"
>{validate_logic_task_count}</font>
\n
知识性差错任务:<font color=
\"
comment
\"
>{knowledge_task_count}</font>
"
}
}
requests
.
post
(
url
,
json
=
data
)
...
...
@@ -72,10 +73,15 @@ def ws_error(minute, error_answer_list=error_answer):
def
aireview_task
():
semantics_task_count
=
DButils_aireview
()
.
select_sql
(
"select count(*) from aireview.semantics_task where status = 0;"
)
ideology_task_count
=
DButils_aireview
()
.
select_sql
(
"select count(*) from aireview.ideology_task where status = 0;"
)
if
semantics_task_count
[
0
][
0
]
>
60000
or
ideology_task_count
[
0
][
0
]
>
20000
:
task_count
(
semantics_task_count
[
0
][
0
],
ideology_task_count
[
0
][
0
],
url
=
aireview_task_url
)
"select count(*) from aireview.semantics_task where create_time >date(now()) and status = 0;"
)
ideology_task_count
=
DButils_aireview
()
.
select_sql
(
"select count(*) from aireview.ideology_task where "
"create_time >date(now()) and status = 0;"
)
validate_logic_task_count
=
DButils_aireview
()
.
select_sql
(
"select count(*) from aireview.validate_logic_task where create_time >date(now()) and status =0;"
)
knowledge_task_count
=
DButils_aireview
()
.
select_sql
(
"select count(*) from aireview.knowledge_task kt2 where create_time >date(now()) and status =0;"
)
if
semantics_task_count
[
0
][
0
]
>
60000
or
ideology_task_count
[
0
][
0
]
>
20000
or
validate_logic_task_count
[
0
][
0
]
>
20000
or
knowledge_task_count
[
0
][
0
]
>
20000
:
task_count
(
semantics_task_count
[
0
][
0
],
ideology_task_count
[
0
][
0
],
validate_logic_task_count
[
0
][
0
],
knowledge_task_count
[
0
][
0
],
url
=
aireview_task_url
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment