feat: Update Application layer for Hangfire integration

- Add CronSchedule property to CfgProfileDto for scheduling support
- Create ProfileSqlJobDto for SQL job execution data transfer
- Update TriggeringDEXJobBatchCommand to accept ProfileId and Jobs collection
- Make TriggeringDEXJobBatchCommand public for Hangfire job activation
- Update Application DependencyInjection with required service registrations
This commit is contained in:
2026-07-12 00:04:40 +02:00
parent 7efc77ca51
commit 3a1e16a7a0
4 changed files with 61 additions and 54 deletions

View File

@@ -1,6 +1,7 @@
using ECMJobRunner.Application.Behaviors;
using MediatR;
using Microsoft.Extensions.DependencyInjection;
using ReC.Client;
using System.Reflection;
namespace ECMJobRunner.Application
@@ -16,7 +17,7 @@ namespace ECMJobRunner.Application
/// </summary>
/// <param name="services">The service collection</param>
/// <returns>The service collection for chaining</returns>
public static IServiceCollection AddApplication(this IServiceCollection services)
public static IServiceCollection AddJobRunnerServices(this IServiceCollection services, string recClientApiUrl)
{
var assembly = Assembly.GetExecutingAssembly();
@@ -26,6 +27,10 @@ namespace ECMJobRunner.Application
#else
services.AddMediatR(cfg => cfg.RegisterServicesFromAssembly(assembly));
#endif
services.AddRecClient(recClientApiUrl, opt =>
{
opt.LogSuccessfulRequests = true;
});
// Register pipeline behaviors in execution order
// Order matters: MainQuery -> CheckQuery -> ReCRequest