Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
A
aidso-data
Project
Project
Details
Activity
Releases
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
Yaowentong
aidso-data
Commits
bb703b73
Commit
bb703b73
authored
Jun 17, 2026
by
Yaowentong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复
parent
56367639
Changes
4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
162 additions
and
362 deletions
+162
-362
dashboard.py
aidso_geo/core/routes/dashboard.py
+59
-2
queue_monitor.html
aidso_geo/core/templates/queue_monitor.html
+97
-353
process.py
aidso_geo/models/process.py
+6
-4
qianwen_android_data_process.py
aidso_geo/models/qianwen_android_data_process.py
+0
-3
No files found.
aidso_geo/core/routes/dashboard.py
View file @
bb703b73
from
flask
import
jsonify
,
Blueprint
,
render_templat
e
from
datetime
import
datetim
e
from
flask
import
jsonify
,
Blueprint
,
render_template
,
request
import
requests
from
aidso_geo.config.base_config
import
init_redis
dashboard_app
=
Blueprint
(
"dashboard"
,
__name__
)
redis_client
=
init_redis
()
@
dashboard_app
.
route
(
"/api/queue/status"
,
methods
=
[
"GET"
])
def
queue_status
():
data
=
{}
...
...
@@ -29,3 +33,56 @@ def queue_status():
@
dashboard_app
.
route
(
"/queue/monitor"
,
methods
=
[
"GET"
])
def
queue_monitor_page
():
return
render_template
(
"queue_monitor.html"
)
@
dashboard_app
.
route
(
"/api/queue/platformStats"
,
methods
=
[
"GET"
])
def
get_req_trend
():
begin
=
request
.
args
.
get
(
"begin"
,
""
)
.
strip
()
end
=
request
.
args
.
get
(
"end"
,
""
)
.
strip
()
if
not
begin
or
not
end
:
return
jsonify
({
"code"
:
400
,
"msg"
:
"begin and end are required"
,
"data"
:
[]
}),
400
try
:
params
=
{
"begin"
:
normalize_date_to_datetime
(
begin
,
"00:00:00"
),
"end"
:
normalize_date_to_datetime
(
end
,
"23:59:59"
),
}
begin_time
=
datetime
.
strptime
(
params
[
"begin"
],
"
%
Y-
%
m-
%
d
%
H:
%
M:
%
S"
)
end_time
=
datetime
.
strptime
(
params
[
"end"
],
"
%
Y-
%
m-
%
d
%
H:
%
M:
%
S"
)
if
begin_time
>
end_time
:
return
jsonify
({
"code"
:
400
,
"msg"
:
"begin must be earlier than end"
,
"data"
:
[]
}),
400
except
ValueError
:
return
jsonify
({
"code"
:
400
,
"msg"
:
"begin and end must be YYYY-MM-DD"
,
"data"
:
[]
}),
400
url
=
"https://openapi.aidso.com/openapi/ywt/platformStats"
try
:
response
=
requests
.
get
(
url
,
params
=
params
,
timeout
=
300
)
response
.
raise_for_status
()
return
jsonify
(
response
.
json
())
except
(
requests
.
RequestException
,
ValueError
)
as
e
:
return
jsonify
({
"code"
:
500
,
"msg"
:
f
"platformStats request failed: {e}"
,
"data"
:
[]
}),
500
def
normalize_date_to_datetime
(
value
,
default_time
):
date_value
=
value
.
replace
(
"T"
,
" "
)
.
strip
()[:
10
]
datetime
.
strptime
(
date_value
,
"
%
Y-
%
m-
%
d"
)
return
f
"{date_value} {default_time}"
aidso_geo/core/templates/queue_monitor.html
View file @
bb703b73
This diff is collapsed.
Click to expand it.
aidso_geo/models/process.py
View file @
bb703b73
...
...
@@ -1625,14 +1625,14 @@ def platform_process(data):
response_content
=
None
#
#
——————————————###################
#——————————————###################
# has_original = check_file_in_tos(original_path)
# has_context = check_file_in_tos(context_path)
# # 重新跑逻辑 当俩个都有走下面
# if has_original and has_context:
# process_func = PLATFORM_PROCESS_MAP.get(platform)
# if process_func:
# _, _, _, _, response_content, _ = process_func(
original_path
)
# _, _, _, _, response_content, _ = process_func(
data
)
# # 2. 只有 context:直接读 context
# elif has_context:
# response_content = tos_utils.get_string_from_tos(context_path)
...
...
@@ -1641,16 +1641,18 @@ def platform_process(data):
# elif has_original:
# process_func = PLATFORM_PROCESS_MAP.get(platform)
# if process_func:
# _, _, _, _, response_content, _ = process_func(
original_path
)
#
#
——————————————###################
# _, _, _, _, response_content, _ = process_func(
data
)
#——————————————###################
#-------------
if
check_file_in_tos
(
context_path
):
response_content
=
tos_utils
.
get_string_from_tos
(
context_path
)
else
:
process_func
=
PLATFORM_PROCESS_MAP
.
get
(
platform
)
if
process_func
:
_
,
_
,
_
,
_
,
response_content
,
_
=
process_func
(
data
)
#-------------
if
response_content
:
result_v2
(
response_content
,
data
)
else
:
...
...
aidso_geo/models/qianwen_android_data_process.py
View file @
bb703b73
...
...
@@ -262,10 +262,7 @@ if __name__ == '__main__':
i
[
'keywords'
]
=
json
.
loads
(
i
.
get
(
'keywords'
))
if
i
.
get
(
'productWordsMap'
):
i
[
'productWordsMap'
]
=
json
.
loads
(
i
.
get
(
'productWordsMap'
))
type_t
=
i
.
get
(
'type'
)
# type_t = 'batch'
# return task_send_queue(i,type_t)
return
qianwen_android_process_original_data
(
i
)
...
...
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