Skip to content

Add strike persistency#437

Merged
Flaminel merged 8 commits intomainfrom
add_strike_persistency
Feb 14, 2026
Merged

Add strike persistency#437
Flaminel merged 8 commits intomainfrom
add_strike_persistency

Conversation

@Flaminel
Copy link
Contributor

No description provided.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request implements strike persistency by moving strike data from in-memory cache to database storage. The changes introduce new database models (Strike, DownloadItem, JobRun) to track strikes across application restarts, add a configurable inactivity window for automatic strike cleanup, and enhance observability by linking strikes to job runs and enriching events/logs with contextual information.

Changes:

  • Implemented database-backed strike persistence replacing memory cache
  • Added configurable strike inactivity window with sliding window cleanup
  • Enhanced event and log tracking with job run IDs, instance information, and download client context

Reviewed changes

Copilot reviewed 100 out of 104 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
docs/docs/configuration/general/index.mdx Added documentation for strike inactivity window and purge functionality
code/frontend/src/app/ui/badge/badge.component.* Added 'accent' badge severity for download client type display
code/frontend/src/app/shared/models/general-config.model.ts Added strikeInactivityWindowHours configuration field
code/frontend/src/app/features/settings/general/* Implemented UI for strike inactivity configuration and purge strikes button
code/frontend/src/app/features/logs-component/* Enhanced logs with job run filtering and additional context fields
code/frontend/src/app/features/events/* Enhanced events with job run filtering and source information
code/frontend/src/app/features/dashboard/* Updated to use itemName instead of downloadName in event data
code/frontend/src/app/core/services/documentation.service.ts Added help key mapping for strike inactivity window
code/frontend/src/app/core/models/* Extended models with job run IDs and context fields
code/frontend/src/app/core/api/* Added purge strikes endpoint and job run ID filtering
code/backend/Cleanuparr.Shared/Helpers/Constants.cs Removed unused CacheLimitBuffer constant
code/backend/Cleanuparr.Persistence/Models/State/* Added Strike, DownloadItem, and JobRun database models
code/backend/Cleanuparr.Persistence/Models/Events/* Extended event models with context fields and relationships
code/backend/Cleanuparr.Persistence/Models/Configuration/General/GeneralConfig.cs Added strike inactivity window configuration
code/backend/Cleanuparr.Persistence/Migrations/* Database migrations for new tables and columns
code/backend/Cleanuparr.Persistence/EventsContext.cs Added DbSets and configured relationships for new models
code/backend/Cleanuparr.Infrastructure/Services/RuleEvaluator.cs Replaced cache with database queries for progress tracking
code/backend/Cleanuparr.Infrastructure/Services/JobManagementService.cs Updated imports for JobType enum move
code/backend/Cleanuparr.Infrastructure/Logging/SignalRLogSink.cs Enhanced log entries with additional context properties
code/backend/Cleanuparr.Infrastructure/Helpers/LogProperties.cs Added new log property constants
code/backend/Cleanuparr.Infrastructure/Features/ItemStriker/Striker.cs Replaced memory cache with database persistence
code/backend/Cleanuparr.Infrastructure/Features/Jobs/* Added job run tracking and context enrichment
code/backend/Cleanuparr.Infrastructure/Features/DownloadClient/* Removed memory cache dependency and added context properties
code/backend/Cleanuparr.Infrastructure/Features/Context/ContextProvider.cs Added job run ID management methods
code/backend/Cleanuparr.Infrastructure/Events/* Enhanced event publishing with strikes, job runs, and context
code/backend/Cleanuparr.Infrastructure/Events/EventCleanupService.cs Added strike cleanup based on inactivity window
code/backend/Cleanuparr.Infrastructure.Tests/* Updated tests for new signatures and database-backed striker
code/backend/Cleanuparr.Domain/Enums/* Moved JobType enum and added JobRunStatus enum
code/backend/Cleanuparr.Domain/Entities/HealthCheck/HealthCheckResult.cs Extracted health check result to domain entity
code/backend/Cleanuparr.Api/Jobs/GenericJob.cs Implemented job run tracking with database persistence
code/backend/Cleanuparr.Api/Features/General/Controllers/GeneralConfigController.cs Added purge strikes endpoint
code/backend/Cleanuparr.Api/Features/General/Contracts/Requests/UpdateGeneralConfigRequest.cs Added validation for strike inactivity window
code/backend/Cleanuparr.Api/Controllers/* Updated imports and added job run ID filtering
Files not reviewed (4)
  • code/backend/Cleanuparr.Persistence/Migrations/Data/20260213155055_AddStrikeInactivityWindow.Designer.cs: Language not supported
  • code/backend/Cleanuparr.Persistence/Migrations/Events/20251220204209_AddStrikes.Designer.cs: Language not supported
  • code/backend/Cleanuparr.Persistence/Migrations/Events/20260213090744_AddEventContextColumns.Designer.cs: Language not supported
  • code/backend/Cleanuparr.Persistence/Migrations/Events/20260213160156_AddOnStrikeDeleteBehavior.Designer.cs: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Flaminel Flaminel merged commit 8aeeca1 into main Feb 14, 2026
8 checks passed
@Flaminel Flaminel deleted the add_strike_persistency branch February 14, 2026 02:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants