Skip to content

Commit

Permalink
Add tracing message for when a new task is spawned (#49)
Browse files Browse the repository at this point in the history
  • Loading branch information
swlynch99 authored Sep 16, 2024
1 parent a40571e commit 0d8bdbd
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion crates/durable-runtime/src/worker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -702,13 +702,20 @@ impl Worker {
tx.commit().await?;

if !tasks.is_empty() {
tracing::info!("launching {} tasks", tasks.len());
tracing::debug!("launching {} tasks", tasks.len());
}

for task in tasks {
let shared = self.shared.clone();
let engine = self.engine.clone();
let worker_id = self.worker_id;

tracing::trace!(
target: "durable_runtime::worker::spawn_new_tasks",
id = task.id,
"launching task {}", task.name
);

let future = async move {
let task_id = task.id;
if let Err(e) = Self::run_task(shared, engine, task, worker_id)
Expand Down

0 comments on commit 0d8bdbd

Please sign in to comment.