Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
eshiled-new
/
funasr_web
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit c757d2bd
authored
Nov 06, 2024
by
‘chizw’
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
[+]补偿优化
1 parent
1d5ed18d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
config/config.py
config/config.py
View file @
c757d2b
import
sys
import
sys
from
log.logger
import
log
from
log.logger
import
log
import
os
import
os
import
importlib.metadata
def
get_package_version
(
package_name
):
try
:
version
=
importlib
.
metadata
.
version
(
package_name
)
print
(
f
"{package_name} version: {version}"
)
return
version
except
importlib
.
metadata
.
PackageNotFoundError
:
print
(
f
"Package {package_name} is not installed."
)
return
f
"Package {package_name} is not installed."
def
extract_sys_param
(
param_name
,
default_value
=
None
):
def
extract_sys_param
(
param_name
,
default_value
=
None
):
env_index
=
None
env_index
=
None
...
@@ -37,6 +47,7 @@ class ConfigInfo:
...
@@ -37,6 +47,7 @@ class ConfigInfo:
from
config.config_dev
import
Config
from
config.config_dev
import
Config
log
.
info
(
vars
(
Config
))
log
.
info
(
vars
(
Config
))
get_package_version
(
"funasr"
)
DEBUG
=
Config
.
DEBUG
DEBUG
=
Config
.
DEBUG
env
=
Config
.
env
env
=
Config
.
env
# 数据库连接配置
# 数据库连接配置
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment