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
87f7ae98
Commit
87f7ae98
authored
Aug 08, 2025
by
baiquan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor(upload): 优化视频上传异常处理逻辑
- 移除了注释的异常捕获代码块 - 在准备视频文件时增加异常捕获,返回 None 以避免抛出异常 - 删除了多余的注释和未使用的代码
parent
65603605
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
service/upload_video.py
+5
-4
No files found.
service/upload_video.py
View file @
87f7ae98
...
...
@@ -633,14 +633,15 @@ def is_video_corrupted(file_path):
def
upload_video_with_multithreading
(
task
):
"""多线程视频上传主函数"""
# 准备视频文件(同原逻辑)
#
try:
file_path
=
prepare_video_file
(
task
)
try
:
file_path
=
prepare_video_file
(
task
)
# except VideoError:
# # 视频时长超过60秒, 使用生成视频
# video_info = generate_video(task)
# return video_info
# except Exception as e:
# raise e
except
Exception
as
e
:
return
None
# raise e
# 初始化上传
upload
=
Upload
(
task
)
upload
.
file_size
=
os
.
path
.
getsize
(
file_path
)
...
...
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