Skip to content

Commit

Permalink
refine info print
Browse files Browse the repository at this point in the history
  • Loading branch information
smtmfft committed Oct 15, 2024
1 parent f3e406a commit 2d918a8
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions host/src/proof.rs
Original file line number Diff line number Diff line change
Expand Up @@ -231,13 +231,13 @@ impl ProofActor {
while let Some(message) = self.receiver.recv().await {
match message {
Message::Cancel(key) => {
debug!("Message::Cancel task: {key:?}");
debug!("Message::Cancel({key:?})");
if let Err(error) = self.cancel_task(key).await {
error!("Failed to cancel task: {error}")
}
}
Message::Task(proof_request) => {
debug!("Message::Task proof_request: {proof_request:?}");
debug!("Message::Task({proof_request:?})");
let running_task_count = self.running_tasks.lock().await.len();
if running_task_count < self.opts.concurrency_limit {
info!("Running task {proof_request:?}");
Expand All @@ -253,9 +253,9 @@ impl ProofActor {
}
Message::TaskComplete(req) => {
// pop up pending task if any task complete
debug!("Message::TaskComplete: {req:?}");
debug!("Message::TaskComplete({req:?})");
info!(
"task completed, current running {:?}, pending: {:?}",
"task {req:?} completed, current running {:?}, pending: {:?}",
self.running_tasks.lock().await.len(),
self.pending_tasks.lock().await.len()
);
Expand All @@ -269,11 +269,13 @@ impl ProofActor {
}
}
Message::CancelAggregate(request) => {
debug!("Message::CancelAggregate({request:?})");
if let Err(error) = self.cancel_aggregation_task(request).await {
error!("Failed to cancel task: {error}")
}
}
Message::Aggregate(request) => {
debug!("Message::Aggregate({request:?})");
let permit = Arc::clone(&semaphore)
.acquire_owned()
.await
Expand Down

0 comments on commit 2d918a8

Please sign in to comment.