Conversation
added 11 commits
March 26, 2026 17:39
Add AWS/SQS/Redis option classes with Key constants, IJobHelper and IBatchJobService contracts, IMessagePublisher and IIntegrationEvent abstractions, BatchKey/BatchInfo/BatchProgressInfo/BatchMonitorResult models, and ProcessAssetDataJobDto. FluentResults added as dependency.
Implement BaseJob with Start -> RunAsync -> Finally lifecycle using FluentResults for business errors. Add thread-safe JobHelper with ConcurrentDictionary for progress bars, batch progress tracking via Redis, and async WhenAllEx. Register IJobHelper (Singleton) and IBatchJobService (Scoped) in DI. Add Hangfire Pro, Console, and Throttling package references.
…d commands Add ProcessAssetJob (individual asset processing with batch progress reporting in finally block) and ProcessAssetBatchJob (creates monitored batch via IBatchJobService). Add AssetCreatedEvent, consumer that bridges MassTransit to Hangfire, validator, CreateAssetCommand and handler that publishes via IMessagePublisher.
…ss bar Add BatchMonitorJob as a standalone polling job that monitors any batch via Redis progress hash, displaying a Hangfire Console progress bar. Add BatchJobService with StartMonitoredBatch (Action<object, string> signature for batchKeyValue access in lambda), AttachToBatch, CancelBatch, and GetBatchMonitorResult. Add BatchJobServiceExtensions for type-safe batch job enqueueing with automatic job counting.
Add MessagePublisher implementing IMessagePublisher, MassTransit configuration with Amazon SQS transport, and DI registration. MassTransit pinned to 8.5.8 (v9+ requires license — TODO in csproj).
Add RedisExtension for StackExchange.Redis configuration using RedisOption. Update Persistence and AntiCorruption csproj dependencies.
…guration Rename src/Api to src/App. Add HangfireExtension with Hangfire Pro Redis storage, .UseBatches(), .UseThrottling(), .UseConsole(), and dashboard at /dashboard route. Add HangfireQueuesExtension for queue configuration. Add Hangfire.Pro 3.0.4, Hangfire.Pro.Redis 3.3.1, and Hangfire.Throttling 1.4.3 package references.
Add ScalarExtension with Kepler theme, dark mode enabled via .EnableDarkMode(), and documentation route at /documentation. Swagger extension was removed in the previous commit.
Add VersioningExtension with UrlSegmentApiVersionReader, .AddMvc() in
chain, and DefaultApiVersion 2.0. Add JobsController with v1 (deprecated)
and v2 (current) endpoints, including GET /api/v2/jobs/batch/{batchId}/monitor
for querying real-time batch progress.
…solution file Configure Program.cs with full pipeline (Hangfire, Scalar, Versioning, MassTransit, Redis). Add Redis.Database=1 and AWS/SQS options to appsettings.json. Update launchSettings.json with port 5015 and launchUrl=dashboard. Update solution file for Api->App rename.
…atchMonitorJob All tests use [Theory] with MemberData and TheoryData<T> static properties — no objects created inside test methods. 48 test executions covering job lifecycle, batch creation, progress monitoring, storage errors, cancellation, and metadata key patterns. Uses xUnit 2.9.3, NSubstitute 5.3.0, and FluentAssertions 8.3.0.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.