Skip to content

Commit f85b020

Browse files
committed
chore: replace deprecated redis calls
1 parent c7754bd commit f85b020

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

poem/subscription-redis/src/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ struct MutationRoot;
1919
impl MutationRoot {
2020
async fn publish(&self, ctx: &Context<'_>, value: String) -> Result<bool> {
2121
let client = ctx.data_unchecked::<Client>();
22-
let mut conn = client.get_async_connection().await?;
22+
let mut conn = client.get_multiplexed_async_connection().await?;
2323
conn.publish("values", value).await?;
2424
Ok(true)
2525
}
@@ -31,7 +31,7 @@ struct SubscriptionRoot;
3131
impl SubscriptionRoot {
3232
async fn values(&self, ctx: &Context<'_>) -> Result<impl Stream<Item = String>> {
3333
let client = ctx.data_unchecked::<Client>();
34-
let mut conn = client.get_async_connection().await?.into_pubsub();
34+
let mut conn = client.get_async_pubsub().await?;
3535
conn.subscribe("values").await?;
3636
Ok(conn
3737
.into_on_message()

0 commit comments

Comments
 (0)