Commit 554f808c authored by BO ZHANG's avatar BO ZHANG 🏀
Browse files

fix bug in DFS

parent 3a4aee0b
......@@ -60,13 +60,20 @@ class DFS:
print("Multiple DFS locations are available, please specify one")
raise ValueError("Multiple DFS locations are available")
else:
self.location = status_table["location"][status_table["status"]][0]
if location is None:
# set DFS automatically
assert (
status_table["status"].sum() == 1
), "Multiple DFS locations are available"
location = status_table["location"][status_table["status"]][0]
print(f"Using DFS location: {location}")
self.location = location
self.config = CONFIG[self.location]
print(f"Using DFS location: {location}")
for k, v in CONFIG[loc]["dfs"].items():
for k, v in CONFIG[self.location]["dfs"].items():
os.environ.setdefault(k, str(v))
# print("Setting redis config:")
self.redis = Redis(location=loc)
self.redis = Redis(location=self.location)
class Redis(redis.Redis):
......
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