internal JobWorker(JobWorkerBuilder builder) { this.jobWorkerBuilder = builder; this.source = new CancellationTokenSource(); this.logger = builder.LoggerFactory?.CreateLogger <JobWorker>(); this.jobHandler = jobWorkerBuilder.Handler(); this.autoCompletion = builder.AutoCompletionEnabled(); this.pollInterval = jobWorkerBuilder.PollInterval(); }
internal JobWorker(JobWorkerBuilder builder) { source = new CancellationTokenSource(); activator = new JobActivator(builder.Client); activeRequest = builder.Request; maxJobsActive = activeRequest.MaxJobsToActivate; pollInterval = builder.PollInterval(); jobClient = new JobClientWrapper(builder.JobClient); jobHandler = builder.Handler(); autoCompletion = builder.AutoCompletionEnabled(); }
internal JobWorker(JobWorkerBuilder builder) { this.jobWorkerBuilder = builder; this.source = new CancellationTokenSource(); this.logger = builder.LoggerFactory?.CreateLogger <JobWorker>(); this.jobHandler = jobWorkerBuilder.Handler(); this.autoCompletion = builder.AutoCompletionEnabled(); this.pollInterval = jobWorkerBuilder.PollInterval(); this.activateJobsCommand = jobWorkerBuilder.Command; this.maxJobsActive = jobWorkerBuilder.Command.Request.MaxJobsToActivate; this.thresholdJobsActivation = maxJobsActive * 0.6; }