Skip to content

Commit

Permalink
Merge pull request #2232 from karthik2804/redis_print_channels
Browse files Browse the repository at this point in the history
print active channels on redis trigger
  • Loading branch information
karthik2804 authored Jan 19, 2024
2 parents bce0001 + e5a78c6 commit 98b7e2e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions crates/redis/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,12 @@ impl TriggerExecutor for RedisTrigger {
.with_context(|| anyhow!("Redis trigger failed to connect to {}", address))?
.into_pubsub();

println!("Active Channels on {address}:");
// Subscribe to channels
for (channel, component) in self.channel_components.iter() {
tracing::info!("Subscribing component {component:?} to channel {channel:?}");
pubsub.subscribe(channel).await?;
println!("\t{channel}: [{}]", component.join(","));
}

let mut stream = pubsub.on_message();
Expand Down

0 comments on commit 98b7e2e

Please sign in to comment.