Skip to content

Commit

Permalink
fix(bonfire): use REDIS_URI env var
Browse files Browse the repository at this point in the history
  • Loading branch information
TheBobBobs committed Feb 2, 2024
1 parent 3d3326e commit 3081933
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions crates/bonfire/src/websocket.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
use std::net::SocketAddr;

use async_tungstenite::WebSocketStream;
use fred::interfaces::{ClientLike, EventInterface, PubsubInterface};
use fred::{
interfaces::{ClientLike, EventInterface, PubsubInterface},
types::RedisConfig,
};
use futures::{
channel::oneshot,
pin_mut, select,
Expand All @@ -16,7 +19,7 @@ use revolt_quark::{
state::{State, SubscriptionStateChange},
},
models::{user::UserHint, User},
redis_kiss::{PayloadType, REDIS_PAYLOAD_TYPE},
redis_kiss::{PayloadType, REDIS_PAYLOAD_TYPE, REDIS_URI},
Database,
};

Expand Down Expand Up @@ -142,7 +145,8 @@ async fn listener(
config: &ProtocolConfiguration,
write: &Mutex<WsWriter>,
) {
let Ok(subscriber) = fred::prelude::Builder::default_centralized().build_subscriber_client()
let redis_config = RedisConfig::from_url(&REDIS_URI).unwrap();
let Ok(subscriber) = fred::types::Builder::from_config(redis_config).build_subscriber_client()
else {
return;
};
Expand Down

0 comments on commit 3081933

Please sign in to comment.