mirror of
https://github.com/SoPat712/allstarr.git
synced 2026-02-09 23:55:10 -05:00
reduce overlapping runs
This commit is contained in:
@@ -55,8 +55,12 @@ public class SpotifyTrackMatchingService : BackgroundService
|
||||
_logger.LogError(ex, "Error during startup track matching");
|
||||
}
|
||||
|
||||
// Now start the periodic matching loop
|
||||
while (!stoppingToken.IsCancellationRequested)
|
||||
{
|
||||
// Wait 30 minutes before next run
|
||||
await Task.Delay(TimeSpan.FromMinutes(30), stoppingToken);
|
||||
|
||||
try
|
||||
{
|
||||
await MatchAllPlaylistsAsync(stoppingToken);
|
||||
@@ -65,9 +69,6 @@ public class SpotifyTrackMatchingService : BackgroundService
|
||||
{
|
||||
_logger.LogError(ex, "Error in track matching service");
|
||||
}
|
||||
|
||||
// Run every 30 minutes to catch new missing tracks
|
||||
await Task.Delay(TimeSpan.FromMinutes(30), stoppingToken);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user