From 8e2ded82b939bb03fe2aa389fa8a87c8a2b5803a Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Tue, 29 Oct 2024 18:35:26 +0900 Subject: [PATCH] Exit more eagerly on cancellation during sleep --- .../Commands/Performance/Scores/UpdateAllScoresCommand.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/osu.Server.Queues.ScoreStatisticsProcessor/Commands/Performance/Scores/UpdateAllScoresCommand.cs b/osu.Server.Queues.ScoreStatisticsProcessor/Commands/Performance/Scores/UpdateAllScoresCommand.cs index 5b82d0f3..a3cf6624 100644 --- a/osu.Server.Queues.ScoreStatisticsProcessor/Commands/Performance/Scores/UpdateAllScoresCommand.cs +++ b/osu.Server.Queues.ScoreStatisticsProcessor/Commands/Performance/Scores/UpdateAllScoresCommand.cs @@ -78,6 +78,9 @@ protected override async Task ExecuteAsync(CancellationToken cancellationTo { using (var connection = DatabaseAccess.GetConnection()) await SlaveLatencyChecker.CheckSlaveLatency(connection, cancellationToken); + + if (cancellationToken.IsCancellationRequested) + break; } sw.Restart();