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:
parent
73955353cb
commit
004c490dd8
23 changed files with 529 additions and 177 deletions
|
|
@ -7,10 +7,10 @@ public static class PingEndpoint
|
|||
public static void MapPingEndpoints(this WebApplication app)
|
||||
{
|
||||
var group = app.MapGroup("ping");
|
||||
group.MapGet("/", async (CancellationToken token) =>
|
||||
group.MapGet("/", async (DataContext dbContext, CancellationToken token) =>
|
||||
{
|
||||
await Task.Delay(10);
|
||||
var dict = new { AppVersion = "0.1.4" };
|
||||
await dbContext.CleanupChangeLogAsync(token);
|
||||
var dict = new { AppVersion = "0.1.5" };
|
||||
return Results.Ok(dict);
|
||||
});
|
||||
|
||||
|
|
@ -22,6 +22,7 @@ public static class PingEndpoint
|
|||
return Results.NotFound();
|
||||
|
||||
var dict = new { LastUpdated = log.ChangeTime };
|
||||
await dbContext.CleanupChangeLogAsync(token);
|
||||
return Results.Ok(dict);
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue