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
391b6878
Commit
391b6878
authored
Nov 25, 2025
by
杨基红
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add document monitor
parent
61875236
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
cutils.py
common/cutils.py
+6
-4
No files found.
common/cutils.py
View file @
391b6878
...
@@ -45,12 +45,12 @@ def mk_error_message(error_editor, error_answer, message_id, url=wechaturl):
...
@@ -45,12 +45,12 @@ def mk_error_message(error_editor, error_answer, message_id, url=wechaturl):
requests
.
post
(
url
,
json
=
data
)
requests
.
post
(
url
,
json
=
data
)
def
task_count
(
semantics_task_count
,
ideology_task_count
,
validate_logic_task_count
,
knowledge_task_count
,
dochub_task_count
,
def
task_count
(
semantics_task_count
,
ideology_task_count
,
validate_logic_task_count
,
knowledge_task_count
,
dochub_task_count
,
dochub_file_process_over10minutes_count
,
url
=
wechaturl
):
url
=
wechaturl
):
data
=
{
data
=
{
"msgtype"
:
"markdown"
,
"msgtype"
:
"markdown"
,
"markdown"
:
{
"markdown"
:
{
"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>
\n
文档解析批注任务:<font color=
\"
comment
\"
>{dochub_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>
\n
文档解析批注任务:<font color=
\"
comment
\"
>{dochub_task_count}</font>
\n
文档解析超过10分钟的文件数:<font color=
\"
comment
\"
>{dochub_file_process_over10minutes_count}</font>
"
}
}
}
}
requests
.
post
(
url
,
json
=
data
)
requests
.
post
(
url
,
json
=
data
)
...
@@ -84,6 +84,8 @@ def aireview_task():
...
@@ -84,6 +84,8 @@ def aireview_task():
"select count(*) from aireview.knowledge_task kt2 where create_time >date(now()) and status =0;"
)
"select count(*) from aireview.knowledge_task kt2 where create_time >date(now()) and status =0;"
)
dochub_task_count
=
DButils_dochub
()
.
select_sql
(
dochub_task_count
=
DButils_dochub
()
.
select_sql
(
"select count(*) from document_record where status in (0,1) and create_time >=CURDATE();"
)
"select count(*) from document_record where status in (0,1) and create_time >=CURDATE();"
)
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
or
dochub_task_count
[
0
][
0
]
>
500
:
dochub_file_process_over10minutes_count
=
DButils_dochub
()
.
select_sql
(
task_count
(
semantics_task_count
[
0
][
0
],
ideology_task_count
[
0
][
0
],
validate_logic_task_count
[
0
][
0
],
knowledge_task_count
[
0
][
0
],
dochub_task_count
[
0
][
0
],
url
=
aireview_task_url
)
"SELECT COUNT(*) FROM document_record WHERE status IN (1) AND create_time >= CURDATE() AND TIMESTAMPDIFF(MINUTE, create_time, update_time) > 30;"
)
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
or
dochub_task_count
[
0
][
0
]
>
500
or
dochub_file_process_over10minutes_count
[
0
][
0
]
>
0
:
task_count
(
semantics_task_count
[
0
][
0
],
ideology_task_count
[
0
][
0
],
validate_logic_task_count
[
0
][
0
],
knowledge_task_count
[
0
][
0
],
dochub_task_count
[
0
][
0
],
dochub_file_process_over10minutes_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