Skip to content

Commit

Permalink
Set idempotency cleaner work to run once per day
Browse files Browse the repository at this point in the history
  • Loading branch information
damccull committed Jun 28, 2023
1 parent 66774f5 commit 9187763
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion zero2prod/src/idempotency_remover_worker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ pub async fn run_worker_until_stopped(configuration: Settings) -> Result<(), any
async fn worker_loop(pool: PgPool) -> Result<(), anyhow::Error> {
loop {
remove_old_idempotency_entries(&pool).await?;
tokio::time::sleep(Duration::from_secs(10)).await;
tokio::time::sleep(Duration::from_secs(60 * 60 * 24)).await;
}
}

Expand Down

0 comments on commit 9187763

Please sign in to comment.