From 1aa610678f9737a44b6e9b6ad9e1a5975cd81859 Mon Sep 17 00:00:00 2001 From: Nikhil Acharya <128666399+nikhil-helius@users.noreply.github.com> Date: Wed, 7 Jun 2023 18:20:35 +0530 Subject: [PATCH] bg-task: Add the limit correctly (#50) --- tools/bgtask_creator/src/main.rs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/tools/bgtask_creator/src/main.rs b/tools/bgtask_creator/src/main.rs index 292c7bbc7..d57db21d9 100644 --- a/tools/bgtask_creator/src/main.rs +++ b/tools/bgtask_creator/src/main.rs @@ -499,7 +499,10 @@ pub async fn main() { .await; match res { Ok(_) => { - info!("Task Created: {:?} {:?}", task_hash, task.asset_data_id); + debug!( + "Task Created: {:?} {:?}, count: {:?}", + task_hash, task.asset_data_id, count + ); } Err(e) => { error!("Task failed: {}", e); @@ -509,9 +512,9 @@ pub async fn main() { tasks.push(new_task); } count += 1; - if *limit > 0 && count >= *limit { - break; - } + } + if *limit > 0 && count >= *limit { + break; } }