Toggle navigation
Toggle navigation
This project
Loading...
Sign in
卢阳
/
front_backend_zImage
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
ly0303521
2026-01-28 17:36:22 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
05e3f890d0f3bf80fb902282617d832e4dfc2823
05e3f890
1 parent
a2112b66
httpx关闭代理
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
backend/main.py
backend/main.py
View file @
05e3f89
...
...
@@ -325,7 +325,7 @@ async def startup():
global
LIMITS
LIMITS
=
load_limits_from_config
()
logger
.
info
(
f
"Loaded limits: {LIMITS}"
)
app
.
state
.
http
=
httpx
.
AsyncClient
(
timeout
=
httpx
.
Timeout
(
REQUEST_TIMEOUT_SECONDS
,
connect
=
5.0
))
app
.
state
.
http
=
httpx
.
AsyncClient
(
timeout
=
httpx
.
Timeout
(
REQUEST_TIMEOUT_SECONDS
,
connect
=
5.0
)
,
trust_env
=
False
)
@app.on_event
(
"shutdown"
)
async
def
shutdown
():
await
app
.
state
.
http
.
aclose
()
...
...
@@ -417,7 +417,7 @@ async def submit_video_job_proxy(
try
:
# Use a separate client or the app state client (but need to handle multipart)
# Using separate httpx call for simplicity with files
async
with
httpx
.
AsyncClient
(
timeout
=
30.0
)
as
client
:
async
with
httpx
.
AsyncClient
(
timeout
=
30.0
,
trust_env
=
False
)
as
client
:
resp
=
await
client
.
post
(
url
,
data
=
data
,
files
=
files
)
if
resp
.
status_code
!=
202
and
resp
.
status_code
!=
200
:
...
...
@@ -443,7 +443,7 @@ async def submit_video_job_proxy(
async
def
get_video_status_proxy
(
task_id
:
str
):
url
=
f
"{TURBO_DIFFUSION_LOCAL_URL}/status/{task_id}"
try
:
async
with
httpx
.
AsyncClient
(
timeout
=
10.0
)
as
client
:
async
with
httpx
.
AsyncClient
(
timeout
=
10.0
,
trust_env
=
False
)
as
client
:
resp
=
await
client
.
get
(
url
)
if
resp
.
status_code
==
404
:
...
...
Please
register
or
login
to post a comment