Skip to content

Commit

Permalink
fix: ability to run without redis
Browse files Browse the repository at this point in the history
  • Loading branch information
lgalabru committed May 19, 2023
1 parent debb06c commit 96825c3
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion components/chainhook-cli/src/service/mod.rs
Expand Up @@ -38,7 +38,17 @@ impl Service {
let mut chainhook_config = ChainhookConfig::new();

if predicates.is_empty() {
let registered_predicates = load_predicates_from_redis(&self.config, &self.ctx)?;
let registered_predicates = match load_predicates_from_redis(&self.config, &self.ctx) {
Ok(predicates) => predicates,
Err(e) => {
error!(
self.ctx.expect_logger(),
"Failed loading predicate from storage: {}",
e.to_string()
);
vec![]
}
};
for predicate in registered_predicates.into_iter() {
let predicate_uuid = predicate.uuid().to_string();
match chainhook_config.register_specification(predicate, true) {
Expand Down

0 comments on commit 96825c3

Please sign in to comment.