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
5be56e52
Commit
5be56e52
authored
Jun 12, 2025
by
BO ZHANG
🏀
Browse files
remove redis from config
parent
4aaeaae9
Changes
2
Hide whitespace changes
Inline
Side-by-side
csst_dag/dfs/__init__.py
View file @
5be56e52
...
@@ -38,15 +38,15 @@ class DFS:
...
@@ -38,15 +38,15 @@ class DFS:
for
loc
in
CONFIG
.
keys
():
for
loc
in
CONFIG
.
keys
():
dfs_ip
=
CONFIG
[
loc
][
"dfs"
][
"CSST_DFS_GATEWAY"
].
split
(
":"
)[
0
]
dfs_ip
=
CONFIG
[
loc
][
"dfs"
][
"CSST_DFS_GATEWAY"
].
split
(
":"
)[
0
]
dfs_port
=
int
(
CONFIG
[
loc
][
"dfs"
][
"CSST_DFS_GATEWAY"
].
split
(
":"
)[
1
])
dfs_port
=
int
(
CONFIG
[
loc
][
"dfs"
][
"CSST_DFS_GATEWAY"
].
split
(
":"
)[
1
])
redis_ip
=
CONFIG
[
loc
][
"redis"
][
"host"
]
#
redis_ip = CONFIG[loc]["redis"]["host"]
redis_port
=
CONFIG
[
loc
][
"redis"
][
"port"
]
#
redis_port = CONFIG[loc]["redis"]["port"]
this_dfs_status
=
check_port
(
dfs_ip
,
dfs_port
,
timeout
=
1
)
this_dfs_status
=
check_port
(
dfs_ip
,
dfs_port
,
timeout
=
1
)
this_redis_status
=
check_port
(
redis_ip
,
redis_port
,
timeout
=
1
)
#
this_redis_status = check_port(redis_ip, redis_port, timeout=1)
this_status
=
dict
(
this_status
=
dict
(
location
=
loc
,
location
=
loc
,
status
=
this_dfs_status
and
this_redis_status
,
status
=
this_dfs_status
,
#
and this_redis_status,
dfs
=
this_dfs_status
,
dfs
=
this_dfs_status
,
redis
=
this_redis_status
,
#
redis=this_redis_status,
)
)
status_list
.
append
(
this_status
)
status_list
.
append
(
this_status
)
# print(this_status)
# print(this_status)
...
@@ -75,7 +75,7 @@ class DFS:
...
@@ -75,7 +75,7 @@ class DFS:
for
k
,
v
in
CONFIG
[
self
.
location
][
"dfs"
].
items
():
for
k
,
v
in
CONFIG
[
self
.
location
][
"dfs"
].
items
():
os
.
environ
.
setdefault
(
k
,
str
(
v
))
os
.
environ
.
setdefault
(
k
,
str
(
v
))
# print("Setting redis config:")
# print("Setting redis config:")
self
.
redis
=
Redis
(
location
=
self
.
location
)
#
self.redis = Redis(location=self.location)
class
Redis
(
redis
.
Redis
):
class
Redis
(
redis
.
Redis
):
...
@@ -111,7 +111,7 @@ dfs = DFS(location=None)
...
@@ -111,7 +111,7 @@ dfs = DFS(location=None)
# msgs = r.lrange(name, 0, -1)
# msgs = r.lrange(name, 0, -1)
# for chipid in range(6, 26):
# for chipid in range(6, 26):
# this_msg = gen_msg(
# this_msg = gen_msg(
# dag
_id
="csst-msc-l1-mbi", obsid="11009101682009", chipid=f"{chipid:02d}"
# dag="csst-msc-l1-mbi", obsid="11009101682009", chipid=f"{chipid:02d}"
# )
# )
# print(this_msg)
# print(this_msg)
# r.lpush(name, this_msg)
# r.lpush(name, this_msg)
...
...
csst_dag/dfs/config.toml
View file @
5be56e52
# CSU
# CSU
[csu
.dfs
]
[csu]
CSST_DFS_GATEWAY
=
"192.168.25.89:28000"
CSST_DFS_GATEWAY
=
"192.168.25.89:28000"
CSST_DFS_TOKEN
=
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjQ4ODU0NTA2NjQsInN1YiI6InN5c3RlbSJ9.POsuUABytu8-WMtZiYehiYEa5BnlgqNTXT6X3OTyix0"
CSST_DFS_TOKEN
=
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjQ4ODU0NTA2NjQsInN1YiI6InN5c3RlbSJ9.POsuUABytu8-WMtZiYehiYEa5BnlgqNTXT6X3OTyix0"
[csu.redis]
host
=
"192.168.25.55"
port
=
26379
db
=
1
password
=
"csst__2025"
qname
=
"csst_data_list"
# NAOC
# NAOC
[naoc
.dfs
]
[naoc]
CSST_DFS_GATEWAY
=
"10.80.1.22:28000"
CSST_DFS_GATEWAY
=
"10.80.1.22:28000"
CSST_DFS_TOKEN
=
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjQ4ODU0NTA2NjQsInN1YiI6InN5c3RlbSJ9.POsuUABytu8-WMtZiYehiYEa5BnlgqNTXT6X3OTyix0"
CSST_DFS_TOKEN
=
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjQ4ODU0NTA2NjQsInN1YiI6InN5c3RlbSJ9.POsuUABytu8-WMtZiYehiYEa5BnlgqNTXT6X3OTyix0"
[naoc.redis]
#[csu.redis]
host
=
"10.80.1.22"
#host="192.168.25.55"
port
=
26379
#port=26379
db
=
0
#db=1
password
=
"csst__2025"
#password="csst__2025"
qname
=
"csst_data_list"
#qname="csst_data_list"
#[naoc.redis]
#host="10.80.1.22"
#port=26379
#db=0
#password="csst__2025"
#qname="csst_data_list"
# ZJLAB-ALIYUN
# ZJLAB-ALIYUN
#[zjlab.dfs]
#[zjlab.dfs]
...
...
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