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-cicd
csst-dag
Commits
c05a51e6
Commit
c05a51e6
authored
Apr 30, 2025
by
BO ZHANG
🏀
Browse files
update DFS
parent
905613a9
Changes
1
Show whitespace changes
Inline
Side-by-side
csst_dag/dfs.py
View file @
c05a51e6
...
...
@@ -34,9 +34,10 @@ def check_port(ip, port, timeout=3):
class
DFS
:
def
__init__
(
self
,
location
=
None
):
# try each location
print
(
"Test all locations:"
)
print
(
"Test all locations:"
,
end
=
""
)
status_list
=
[]
for
loc
in
CONFIG
.
keys
():
print
(
f
"
{
loc
}
..."
,
end
=
""
)
dfs_ip
=
CONFIG
[
loc
][
"dfs"
][
"CSST_DFS_GATEWAY"
].
split
(
":"
)[
0
]
dfs_port
=
int
(
CONFIG
[
loc
][
"dfs"
][
"CSST_DFS_GATEWAY"
].
split
(
":"
)[
1
])
redis_ip
=
CONFIG
[
loc
][
"redis"
][
"host"
]
...
...
@@ -50,7 +51,8 @@ class DFS:
redis
=
this_redis_status
,
)
status_list
.
append
(
this_status
)
print
(
this_status
)
# print(this_status)
print
(
"Done!
\n
"
)
status_table
=
Table
(
status_list
)
print
(
status_table
)
...
...
@@ -83,10 +85,9 @@ class Redis(redis.Redis):
)
self
.
qname
=
password
=
CONFIG
[
location
][
"redis"
][
"qname"
]
self
.
config
=
CONFIG
[
location
][
"redis"
]
print
(
"Setting redis config:"
)
for
k
,
v
in
self
.
config
.
items
():
print
(
f
" -
{
k
}
:
{
v
}
"
)
# print("Setting redis config:")
# for k, v in self.config.items():
# print(f" - {k}: {v}")
def
push
(
self
,
msg
):
self
.
lpush
(
self
.
qname
,
msg
)
...
...
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