Skip to content

Commit 832ae49

Browse files
Clear out current commit if empty benchmarks
1 parent 306b681 commit 832ae49

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

site/src/server.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -558,6 +558,7 @@ pub async fn handle_collected(
558558
} else {
559559
String::new()
560560
};
561+
let mut should_clear = false;
561562
if let Some(current) = persistent.current.as_mut() {
562563
// If the request was received twice (e.g., we stopped after we wrote DB but before
563564
// responding) then we don't want to loop the collector.
@@ -575,9 +576,13 @@ pub async fn handle_collected(
575576
current.commit.sha, comparison_url
576577
),
577578
));
579+
should_clear = true;
578580
}
579581
}
580582
}
583+
if should_clear {
584+
persistent.current = None;
585+
}
581586
}
582587
}
583588

0 commit comments

Comments
 (0)