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
facd415a
Commit
facd415a
authored
Jul 15, 2025
by
baiquan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:优化任务类型输入处理
- 增加异常处理,提高代码健壮性 - 将任务类型转换为整数,确保类型正确
parent
46f8e0be
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
shop.py
+7
-5
No files found.
shop.py
View file @
facd415a
...
@@ -217,13 +217,15 @@ if __name__ == '__main__':
...
@@ -217,13 +217,15 @@ if __name__ == '__main__':
# 内层线程池大小(每个任务)
# 内层线程池大小(每个任务)
INNER_MAX_WORKERS
=
3
INNER_MAX_WORKERS
=
3
argv
=
sys
.
argv
argv
=
sys
.
argv
print
(
argv
)
try
:
if
len
(
argv
)
!=
2
:
if
len
(
argv
)
!=
2
:
raise
Exception
else
:
task_type
=
argv
[
1
]
task_type
=
int
(
task_type
)
except
:
logger
.
error
(
"请传入任务类型(1为店铺登录,2为上传图片与视频)"
)
logger
.
error
(
"请传入任务类型(1为店铺登录,2为上传图片与视频)"
)
sys
.
exit
(
0
)
sys
.
exit
(
0
)
else
:
task_type
=
argv
[
1
]
while
True
:
while
True
:
asyncio
.
run
(
run
(
task_type
))
asyncio
.
run
(
run
(
task_type
))
time
.
sleep
(
10
)
time
.
sleep
(
10
)
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