Skip to content

Commit 7479380

Browse files
fix queue depth calculation
Co-authored-by: Copilot <[email protected]>
1 parent ddef910 commit 7479380

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

core/src/subgraph/trigger_processor.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -420,8 +420,8 @@ where
420420

421421
// Always decrement queue depth by the number of processed triggers
422422
// This ensures cleanup even if processing failed partway through
423-
if processed_count > 0 {
424-
subgraph_state.queue_depth.fetch_sub(processed_count, Ordering::Relaxed);
423+
if !triggers.is_empty() {
424+
subgraph_state.queue_depth.fetch_sub(triggers.len(), Ordering::Relaxed);
425425
}
426426

427427
result

0 commit comments

Comments
 (0)