increasing delay, adding log before and after saving

This commit is contained in:
Andy Pack 2022-10-10 16:53:33 +01:00
parent 492b1dd424
commit 19398a7ee0
Signed by: sarsoo
GPG Key ID: A55BA3536A5E0ED7
2 changed files with 4 additions and 2 deletions

View File

@ -120,7 +120,7 @@ namespace Selector.Cache
foreach(var chunk in toPullFromSpotify.Chunk(50))
{
await PullChunk(chunk, ret);
await Task.Delay(TimeSpan.FromMilliseconds(200));
await Task.Delay(TimeSpan.FromMilliseconds(500));
}
return ret;

View File

@ -119,9 +119,11 @@ public class HistoryPersister
processedCounter += item.Length;
}
Logger?.LogInformation("Added {:n0} historical items for {}", processedCounter, user.UserName);
Logger?.LogInformation("Saving {:n0} historical items for {}", processedCounter, user.UserName);
await Db.SaveChangesAsync();
Logger?.LogInformation("Added {:n0} historical items for {}", processedCounter, user.UserName);
}
private const int FOUR_MINUTES = 4 * 60 * 1000;