Skip to content

Commit

Permalink
More redis refactors
Browse files Browse the repository at this point in the history
This removes a lot of the needless indirection/structs that
were obscuring what should be a pretty simple thing -- i.e., the
different variants for `ConnectionManager`s and `RedisConnection`s.

Note also that by moving some of the `query_async` calls to the
`Cmd` rather than the connection, we can completely remove the
`*Connection` types and associated macros.

There's definitely some more cleanup that can be done here, but I
think this is good for one PR.
  • Loading branch information
jaymell authored and svix-james committed Oct 4, 2024
1 parent ec61c65 commit 4149c75
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 258 deletions.
2 changes: 1 addition & 1 deletion server/svix-server/src/core/cache/redis.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ impl CacheBehavior for RedisCache {

cmd.arg("NX");

let res: Option<()> = pool.query_async(cmd).await?;
let res: Option<()> = cmd.query_async(&mut pool).await?;

Ok(res.is_some())
}
Expand Down
Loading

0 comments on commit 4149c75

Please sign in to comment.