Looks like we finally have a solution.

Change logging to just log a message, instead of the exception.
Moved logic to Syncer involvement.  When posting the data, if a 500 is
returned, then it is up to the Syncer to re-submit it.
This commit is contained in:
Mario Steele 2025-08-09 04:09:17 -05:00
parent 73955353cb
commit 004c490dd8
23 changed files with 529 additions and 177 deletions

View file

@ -65,6 +65,17 @@ public class DataContext : DbContext
.OrderByDescending(cl => cl.ChangeTime)
.FirstOrDefaultAsync(ct);
}
public async Task CleanupChangeLogAsync(CancellationToken ct = default)
{
var logs = await ChangeLogs.ToListAsync(ct);
if (logs.Count < 50) return;
for (var i = 0; i < (logs.Count - 50); i++)
{
ChangeLogs.Remove(logs[i]);
}
await base.SaveChangesAsync(ct);
}
public DbSet<History> Histories { get; set; }
public DbSet<Playlist> Playlists { get; set; }