Commit c1a52e53 authored by BO ZHANG's avatar BO ZHANG 🏀
Browse files

remove redis dependency

parent c7d8f8d5
import redis
import toml import toml
import os import os
from astropy.table import Table from astropy.table import Table
...@@ -88,46 +87,3 @@ class DFS: ...@@ -88,46 +87,3 @@ class DFS:
dfs = DFS(location=None) dfs = DFS(location=None)
# class Redis(redis.Redis):
# def __init__(self, location="naoc", **kwargs):
# if location not in CONFIG.keys():
# print("Available redis locations: ", list(CONFIG.keys()))
# raise ValueError(f"Unknown redis location: {location}")
# super().__init__(
# host=CONFIG[location]["redis"]["host"],
# port=CONFIG[location]["redis"]["port"],
# db=CONFIG[location]["redis"]["db"],
# password=CONFIG[location]["redis"]["password"],
# **kwargs,
# )
# 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}")
#
# def push(self, msg):
# self.lpush(self.qname, msg)
#
# def pop(self):
# return self.rpop(self.qname)
#
# def get_all(self):
# return self.lrange(self.qname, 0, -1)
# msgs = r.lrange(name, 0, -1)
# for chipid in range(6, 26):
# this_msg = gen_msg(
# dag_cfg="csst-msc-l1-mbi", obsid="11009101682009", chipid=f"{chipid:02d}"
# )
# print(this_msg)
# r.lpush(name, this_msg)
#
# msgs = r.lrange(name, 0, -1)
# print(msgs)
#
# msgs_later = r.lrange(name, 0, -1)
# print(msgs_later)
...@@ -26,7 +26,6 @@ dependencies = [ ...@@ -26,7 +26,6 @@ dependencies = [
# 需手动将requirements.txt中的依赖按以下格式转换: # 需手动将requirements.txt中的依赖按以下格式转换:
"astropy", "astropy",
"numpy", "numpy",
"redis",
"toml", "toml",
"csst-dfs-client@git+https://csst-tb.bao.ac.cn/code/csst-dfs/csst-dfs-client.git", "csst-dfs-client@git+https://csst-tb.bao.ac.cn/code/csst-dfs/csst-dfs-client.git",
] ]
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment