@@ -78,7 +78,8 @@ internal sealed class PlatformOperationsQueryService(
|
||||
.Where(item => item.Status == BackgroundJobStatus.Pending)
|
||||
.MinAsync(item => (DateTimeOffset?)item.CreatedAt, cancellationToken);
|
||||
var expired = await dbContext.BackgroundJobs.AsNoTracking()
|
||||
.CountAsync(item => item.Status == BackgroundJobStatus.Processing && item.LockExpiresAt < now, cancellationToken);
|
||||
.CountAsync(item => item.Status == BackgroundJobStatus.Processing && item.LockExpiresAt < now,
|
||||
cancellationToken);
|
||||
return new PlatformJobMetrics(
|
||||
counts,
|
||||
oldest,
|
||||
@@ -96,7 +97,8 @@ internal sealed class PlatformOperationsQueryService(
|
||||
.Select(group => new PlatformMetricCount(group.Key.ToString(), group.Count()))
|
||||
.ToArrayAsync(cancellationToken);
|
||||
var expired = await dbContext.PlatformApprovalRequests.AsNoTracking()
|
||||
.CountAsync(item => item.Status == PlatformApprovalRequestStatus.Pending && item.ExpiresAt <= now, cancellationToken);
|
||||
.CountAsync(item => item.Status == PlatformApprovalRequestStatus.Pending && item.ExpiresAt <= now,
|
||||
cancellationToken);
|
||||
var drafts = await dbContext.PlatformConfigurationVersions.AsNoTracking()
|
||||
.CountAsync(item => item.Status == PlatformConfigurationVersionStatus.Draft, cancellationToken);
|
||||
var notifications = await dbContext.PlatformNotificationDeliveries.AsNoTracking()
|
||||
@@ -105,4 +107,4 @@ internal sealed class PlatformOperationsQueryService(
|
||||
.ToArrayAsync(cancellationToken);
|
||||
return new PlatformGovernanceMetrics(approvals, expired, drafts, notifications, now);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user