Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
doudian-py
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
baiquan
doudian-py
Commits
186a8051
Commit
186a8051
authored
Aug 08, 2025
by
baiquan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor(shop): 调整线程池参数设置
- 将外层线程池大小和内层线程池大小的配置移至主程序入口 - 优化代码结构,提高可读性和可维护性 -确保线程池参数在程序开始时正确设置
parent
e00f6687
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
shop.py
+4
-4
No files found.
shop.py
View file @
186a8051
...
@@ -227,6 +227,10 @@ async def run(task_type):
...
@@ -227,6 +227,10 @@ async def run(task_type):
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
# 外层线程池大小
OUTER_MAX_WORKERS
=
5
# 内层线程池大小(每个任务)
INNER_MAX_WORKERS
=
3
argv
=
sys
.
argv
argv
=
sys
.
argv
try
:
try
:
if
len
(
argv
)
!=
2
:
if
len
(
argv
)
!=
2
:
...
@@ -246,10 +250,6 @@ if __name__ == '__main__':
...
@@ -246,10 +250,6 @@ if __name__ == '__main__':
INNER_MAX_WORKERS
=
1
INNER_MAX_WORKERS
=
1
time
.
sleep
(
10
)
time
.
sleep
(
10
)
elif
task_type
==
TaskType
.
DOUDIAN_UPLOAD_IMAGE_AND_VIDEO
:
elif
task_type
==
TaskType
.
DOUDIAN_UPLOAD_IMAGE_AND_VIDEO
:
# 外层线程池大小
OUTER_MAX_WORKERS
=
5
# 内层线程池大小(每个任务)
INNER_MAX_WORKERS
=
3
time
.
sleep
(
1
)
time
.
sleep
(
1
)
else
:
else
:
time
.
sleep
(
5
)
time
.
sleep
(
5
)
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