提交 bac8cc48 编写于 作者: M Megvii Engine Team

fix(fastrun): fallback when redis config is empty

GitOrigin-RevId: b61630d00723b73477f57ad1b4365d22ba9bf61a
上级 f4f20046
...@@ -34,12 +34,13 @@ class PersistentCacheOnServer(_PersistentCache): ...@@ -34,12 +34,13 @@ class PersistentCacheOnServer(_PersistentCache):
"in-file cache".format(exc) "in-file cache".format(exc)
) )
else: else:
self.add_config( if redis_config is not None:
"redis", self.add_config(
redis_config, "redis",
"fastrun use redis cache", redis_config,
"failed to connect to cache server", "fastrun use redis cache",
) "failed to connect to cache server",
)
if cache_type != "MEMORY": if cache_type != "MEMORY":
path = self.get_cache_file(self.get_cache_dir()) path = self.get_cache_file(self.get_cache_dir())
self.add_config( self.add_config(
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册