Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
csst-dfs
csst-dfs-api-local
Commits
ad97ab01
Commit
ad97ab01
authored
Jun 10, 2022
by
Wei Shoulin
Browse files
path fix
parent
28230154
Changes
1
Hide whitespace changes
Inline
Side-by-side
csst_dfs_api_local/common/db.py
View file @
ad97ab01
...
...
@@ -11,7 +11,10 @@ log = logging.getLogger('csst')
@
singleton
class
DBClient
(
object
):
def
__init__
(
self
):
db_path
=
os
.
path
.
join
(
os
.
getenv
(
"CSST_LOCAL_FILE_ROOT"
,
"/opt/temp/csst"
),
"csst.sqlite"
)
db_path_dir
=
os
.
getenv
(
"CSST_LOCAL_FILE_ROOT"
,
"/opt/temp/csst"
)
if
not
os
.
path
.
exists
(
db_path_dir
):
os
.
makedirs
(
db_path_dir
)
db_path
=
os
.
path
.
join
(
db_path_dir
,
"csst.sqlite"
)
self
.
inited
=
os
.
path
.
exists
(
db_path
)
self
.
pool
=
PersistentDB
(
sqlite3
,
maxusage
=
2
,
database
=
db_path
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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