From 37631459e2bdc5dd8b6f1d9c12ea6cfded30f6df Mon Sep 17 00:00:00 2001 From: 0xKitsune <0xKitsune@protonmail.com> Date: Sat, 13 Apr 2024 16:17:25 -0400 Subject: [PATCH] add sleep time if deletions < min_deletion_batch_size --- src/task_monitor/tasks/delete_identities.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/task_monitor/tasks/delete_identities.rs b/src/task_monitor/tasks/delete_identities.rs index 66dee074..b21779bd 100644 --- a/src/task_monitor/tasks/delete_identities.rs +++ b/src/task_monitor/tasks/delete_identities.rs @@ -100,6 +100,8 @@ async fn delete_identities( // Remove the previous commitments from the deletions table database.remove_deletions(previous_commitments).await?; wake_up_notify.notify_one(); + } else { + tokio::time::sleep(tokio::time::Duration::from_secs(5)).await; } } }