Skip to content

Commit 96825c3

Browse files
author
Ludo Galabru
committed
fix: ability to run without redis
1 parent debb06c commit 96825c3

File tree

1 file changed

+11
-1
lines changed
  • components/chainhook-cli/src/service

1 file changed

+11
-1
lines changed

components/chainhook-cli/src/service/mod.rs

+11-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,17 @@ impl Service {
3838
let mut chainhook_config = ChainhookConfig::new();
3939

4040
if predicates.is_empty() {
41-
let registered_predicates = load_predicates_from_redis(&self.config, &self.ctx)?;
41+
let registered_predicates = match load_predicates_from_redis(&self.config, &self.ctx) {
42+
Ok(predicates) => predicates,
43+
Err(e) => {
44+
error!(
45+
self.ctx.expect_logger(),
46+
"Failed loading predicate from storage: {}",
47+
e.to_string()
48+
);
49+
vec![]
50+
}
51+
};
4252
for predicate in registered_predicates.into_iter() {
4353
let predicate_uuid = predicate.uuid().to_string();
4454
match chainhook_config.register_specification(predicate, true) {

0 commit comments

Comments
 (0)