Skip to content

Commit

Permalink
Update BackgroundMqServices.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
mythz committed Mar 27, 2024
1 parent 9cda9ae commit 220098c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions MyApp.ServiceInterface/BackgroundMqServices.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ public async Task Any(DbWrites request)
await Db.DeleteAsync<PostJob>(x => x.PostId == request.DeletePost);
await Db.DeleteAsync<Vote>(x => x.PostId == request.DeletePost);
await Db.DeleteByIdAsync<Post>(request.DeletePost);
var maxPostId = await Db.ScalarAsync<int>("SELECT MAX(Id) FROM Post");
AppConfig.Instance.SetInitialPostId(Math.Max(100_000_000, maxPostId));
}

if (request.CreatePostJobs is { Count: > 0 })
Expand Down

0 comments on commit 220098c

Please sign in to comment.