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 25, 2024
1 parent 6710625 commit aa18880
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions MyApp.ServiceInterface/BackgroundMqServices.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,14 @@ public async Task Any(DbWrites request)
}, x => x.PostId == startJob.Id);
}

if (request.CompleteJobIds?.Count > 0)
if (request.CompleteJobIds is { Count: > 0 })
{
await Db.UpdateOnlyAsync(() => new PostJob {
CompletedDate = DateTime.UtcNow,
},
x => request.CompleteJobIds.Contains(x.PostId));
x => request.CompleteJobIds.Contains(x.Id));
var postJobs = await Db.SelectAsync(Db.From<PostJob>()
.Where(x => request.CompleteJobIds.Contains(x.PostId)));
.Where(x => request.CompleteJobIds.Contains(x.Id)));

foreach (var postJob in postJobs)
{
Expand Down

0 comments on commit aa18880

Please sign in to comment.