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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user