logs
This commit is contained in:
parent
d99b01c0ac
commit
28a5aa15a7
|
@ -38,12 +38,16 @@ async fn sse_handler(
|
|||
let mut pubsub = conn.into_pubsub();
|
||||
|
||||
pubsub.subscribe("new_follower").await.unwrap();
|
||||
println!("'new_follower' subscribed");
|
||||
pubsub.subscribe("new_shout").await.unwrap();
|
||||
println!("'new_shout' subscribed");
|
||||
pubsub.subscribe("new_reaction").await.unwrap();
|
||||
println!("'new_reaction' subscribed");
|
||||
|
||||
for chat_id in &chats {
|
||||
let channel_name = format!("chat:{}", chat_id);
|
||||
pubsub.subscribe(&channel_name).await.unwrap();
|
||||
println!(format!("'{}' subscribed", channel_name));
|
||||
}
|
||||
|
||||
while let Some(msg) = pubsub.on_message().next().await {
|
||||
|
@ -71,6 +75,7 @@ async fn main() -> std::io::Result<()> {
|
|||
let redis_url = env::var("REDIS_URL").unwrap_or_else(|_| String::from("redis://127.0.0.1/"));
|
||||
let client = redis::Client::open(redis_url).unwrap();
|
||||
|
||||
println!("Connecting to Redis: {}", redis_url);
|
||||
HttpServer::new(move || {
|
||||
App::new()
|
||||
.app_data(web::Data::new(client.clone()))
|
||||
|
|
Loading…
Reference in New Issue
Block a user