feat: add tiered storage guard (Green/Yellow/Red) and dashboard queue monitor
Storage Tier System: - Add StorageTier enum (Green >30% / Yellow 10-30% / Red <10%) - Extend StorageGuardResult with Tier, CanStartNewRecording, ShouldPauseActive, UsagePercent - Yellow tier: deny new recordings but allow existing to finish and upload - Red tier: deny new recordings and pause active sessions - Auto-recovery: when disk frees up, polling automatically resumes new recordings - Update LiveRoomPollingBackgroundService to use tier-based checks - Expose tier + usage percent in Recovery API Dashboard Queue Monitor: - Add pending transcode count, pending upload count, queued data volume to dashboard - Add storage tier badge (Green/Yellow/Red) with usage percentage - Add queue monitoring card to dashboard view Co-Authored-By: Claude Opus 4.8 noreply@anthropic.com
This commit is contained in:
co-authored by
Claude Opus 4.8 noreply@anthropic.com
parent
cbee29bef9
commit
24e5cf2a06
@@ -90,8 +90,13 @@ public sealed class DashboardService
|
||||
{
|
||||
HasEnoughSpace = storageCheck.HasEnoughSpace,
|
||||
Message = storageCheck.Message ?? string.Empty,
|
||||
AvailableBytes = storageCheck.AvailableBytes
|
||||
AvailableBytes = storageCheck.AvailableBytes,
|
||||
Tier = storageCheck.Tier.ToString(),
|
||||
UsagePercent = storageCheck.UsagePercent
|
||||
},
|
||||
PendingTranscodeCount = await _recordTaskRepository.CountByStatusAsync(Domain.Enums.RecordTaskStatus.Processing, cancellationToken),
|
||||
PendingUploadCount = await _recordResultRepository.CountPendingUploadAsync(cancellationToken),
|
||||
QueuedDataBytes = await _recordResultRepository.SumPendingUploadBytesAsync(cancellationToken),
|
||||
RecentSessions = recentSessionsTask.Result
|
||||
.Select(MapRecentSession)
|
||||
.ToList(),
|
||||
|
||||
Reference in New Issue
Block a user