Skip to content

Commit

Permalink
Don't log shutting down after traces finish if nothing waiting.
Browse files Browse the repository at this point in the history
  • Loading branch information
NoahSaso committed Oct 2, 2023
1 parent eba771d commit 846060f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/scripts/export/trace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -539,6 +539,11 @@ const trace = async () => {

// Wait for queue to finish processing.
await new Promise<void>((resolve) => {
if (exporting === 0 && traceQueue.length === 0) {
resolve()
return
}

console.log(
`Shutting down after the queue drains ${traceQueue.length.toLocaleString()} traces and ${exporting.toLocaleString()} finish exporting...`
)
Expand Down

0 comments on commit 846060f

Please sign in to comment.