Publish curated Knowledge Hub source from 2ed833f290b439a7bc91e5fd19b042c269e3bee9

This commit is contained in:
Public Source Publisher committed 2026-10-03 17:07:21 +00:00
1 parent 10f2edcd29
commit 59f15b2d08
218 files changed
+23995 -1849

No files matched your search

@@ -8,10 +8,11 @@ public sealed record CreateBackupCommand(Guid ActorId, string? CorrelationId);
/// an audit event on both success and failure — a failed backup is itself an
/// operationally significant event (docs/19-observability.md "repeated backup
/// failure" alert).</summary>
public sealed class CreateBackupUseCase(IBackupService backups, IAuditEventRecorder auditEvents, TimeProvider timeProvider)
public sealed class CreateBackupUseCase(IBackupService backups, IAuditEventRecorder auditEvents, TimeProvider timeProvider, PlatformMetrics? metrics = null)
{
public async Task<BackupSummary> ExecuteAsync(CreateBackupCommand command, CancellationToken cancellationToken)
{
using var measurement = metrics?.Start("backup");
var now = timeProvider.GetUtcNow();
try
{
@@ -30,6 +31,7 @@ public sealed class CreateBackupUseCase(IBackupService backups, IAuditEventRecor
now),
cancellationToken);
measurement?.Complete(summary.AttachmentCount);
return summary;
}
catch (Exception exception) when (exception is not OperationCanceledException)