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-29 15:23:14 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
83edcf64b60bbb964f213093a932e7a69b50fe7e
83edcf64
1 parent
1480848b
简化读取配置的代码
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
backend/main.py
backend/main.py
View file @
83edcf6
...
...
@@ -19,11 +19,11 @@ import logging
logger
=
logging
.
getLogger
(
"uvicorn.error"
)
Z_IMAGE_BASE_URL
=
os
.
getenv
(
"Z_IMAGE_BASE_URL"
,
"http://106.120.52.146:39009"
)
.
rstrip
(
"/"
)
REQUEST_TIMEOUT_SECONDS
=
float
(
os
.
getenv
(
"REQUEST_TIMEOUT_SECONDS"
,
"120"
))
GALLERY_IMAGES_PATH
=
Path
(
os
.
getenv
(
"GALLERY_IMAGES_PATH"
,
Path
(
__file__
)
.
with_name
(
"gallery_images.json"
)))
GALLERY_VIDEOS_PATH
=
Path
(
os
.
getenv
(
"GALLERY_VIDEOS_PATH"
,
Path
(
__file__
)
.
with_name
(
"gallery_videos.json"
)))
USAGE_PATH
=
Path
(
os
.
getenv
(
"USAGE_PATH"
,
Path
(
__file__
)
.
with_name
(
"usage.json"
)))
GALLERY_IMAGES_PATH
=
Path
(
__file__
)
.
with_name
(
"gallery_images.json"
)
GALLERY_VIDEOS_PATH
=
Path
(
__file__
)
.
with_name
(
"gallery_videos.json"
)
USAGE_PATH
=
Path
(
__file__
)
.
with_name
(
"usage.json"
)
GALLERY_MAX_ITEMS
=
int
(
os
.
getenv
(
"GALLERY_MAX_ITEMS"
,
"500"
))
WHITELIST_PATH
=
Path
(
os
.
getenv
(
"WHITELIST_PATH"
,
Path
(
__file__
)
.
with_name
(
"whitelist.txt"
))
)
WHITELIST_PATH
=
Path
(
__file__
)
.
with_name
(
"whitelist.txt"
)
ADMIN_ID
=
"86427531"
# --- Add this line to fix the port ---
...
...
Please
register
or
login
to post a comment