Skip to content

Commit

Permalink
Remove totally unnecessary DatabaseConnection clone (#1115)
Browse files Browse the repository at this point in the history
## Motivation

This clone is totally unnecessary. It's not a huge deal since the
underlying PgPool is ARCed, but still.
  • Loading branch information
svix-gabriel authored Nov 9, 2023
2 parents 4eb0fb9 + 9ce55c6 commit a56c69b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions server/svix-server/src/expired_message_cleaner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,7 @@ pub async fn expired_message_cleaner_loop(pool: &DatabaseConnection) -> Result<(
if let Some(duration) = sleep_time {
sleep(duration).await;
}
let pool = pool.clone();
match clean_expired_messages(&pool, BATCH_SIZE).await {
match clean_expired_messages(pool, BATCH_SIZE).await {
Err(err) => {
tracing::error!("{}", err);
}
Expand Down

0 comments on commit a56c69b

Please sign in to comment.