public ExposureKeySetBatchJobMk2(/*IExposureKeySetBatchJobConfig jobConfig,*/ IGaenContentConfig gaenContentConfig, IExposureKeySetBuilder builder, WorkflowDbContext workflowDbContext, ExposureContentDbContext contentDbContext, IUtcDateTimeProvider dateTimeProvider, IPublishingId publishingId)
 {
     //_JobConfig = jobConfig;
     _GaenContentConfig = gaenContentConfig;
     _SetBuilder        = builder;
     _WorkflowDbContext = workflowDbContext;
     _ContentDbContext  = contentDbContext;
     _PublishingId      = publishingId;
     _Used   = new List <EksCreateJobInputEntity>(_GaenContentConfig.ExposureKeySetCapacity); //
     _Start  = dateTimeProvider.Now();
     JobName = $"ExposureKeySetsJob_{_Start:u}".Replace(" ", "_").Replace(":", "_");
 }
 public ExposureKeySetBatchJobMk2(/*IExposureKeySetBatchJobConfig jobConfig,*/ IGaenContentConfig gaenContentConfig, IExposureKeySetBuilder builder, WorkflowDbContext workflowDbContext, PublishingJobDbContext publishingDbContext, ContentDbContext contentDbContext, IUtcDateTimeProvider dateTimeProvider, IPublishingId publishingId, ILogger <ExposureKeySetBatchJobMk2> logger)
 {
     //_JobConfig = jobConfig;
     _GaenContentConfig   = gaenContentConfig ?? throw new ArgumentNullException(nameof(gaenContentConfig));
     _SetBuilder          = builder ?? throw new ArgumentNullException(nameof(builder));
     _WorkflowDbContext   = workflowDbContext ?? throw new ArgumentNullException(nameof(workflowDbContext));
     _PublishingDbContext = publishingDbContext ?? throw new ArgumentNullException(nameof(publishingDbContext));
     _ContentDbContext    = contentDbContext ?? throw new ArgumentNullException(nameof(contentDbContext));
     _PublishingId        = publishingId;
     _Logger  = logger ?? throw new ArgumentNullException(nameof(logger));
     _Used    = new List <EksCreateJobInputEntity>(_GaenContentConfig.ExposureKeySetCapacity); //
     _Start   = dateTimeProvider.Now();
     _JobName = $"ExposureKeySetsJob_{_Start:u}".Replace(" ", "_").Replace(":", "_");
 }
Beispiel #3
0
        /// <summary>
        /// Prod
        /// </summary>
        public ExposureKeySetBatchJob(ITekSource tekSource, IDbContextOptionsBuilder jobDbOptionsBuilder, IUtcDateTimeProvider dateTimeProvider,
                                      IExposureKeySetWriter eksWriter, IAgConfig agConfig, IJsonExposureKeySetFormatter jsonSetFormatter, IExposureKeySetBuilder agSetBuilder, IExposureKeySetBatchJobConfig jobConfig)
        {
            _Used   = new List <WorkflowInputEntity>(_JobConfig.InputListCapacity);
            _Start  = dateTimeProvider.Now();
            JobName = $"ExposureKeySetsJob_{_Start:u}".Replace(" ", "_");

            _AgConfig  = agConfig;
            _TekSource = tekSource;

            _JobDbProvider = new DbContextProvider <ExposureKeySetsBatchJobDbContext>(
                () => new ExposureKeySetsBatchJobDbContext(jobDbOptionsBuilder.AddDatabaseName(JobName).Build()));

            _JsonSetFormatter = jsonSetFormatter;
            _AgSetBuilder     = agSetBuilder;
            _JobConfig        = jobConfig;
            _Writer           = eksWriter;
        }