public LoggingServiceThreadList(ChildProcessTrackerWrapper childProcessTracker, ProcessWrapperFactory processFactory, IJobConfig jobConfig) : base(jobConfig) { _childProcessTracker = childProcessTracker; _processFactory = processFactory; _jobConfig = jobConfig; }
public HangfireServerThreadList(IChildProcessTracker childProcessTracker, IProcessFactory processFactory, IJobConfig jobConfig) : base(jobConfig) { _childProcessTracker = childProcessTracker; _processFactory = processFactory; _jobConfig = jobConfig; }
protected ProcessMonitor(IChildProcessTracker childProcessTracker, IProcessFactory processFactory, IJobConfig config) { _childProcessTracker = childProcessTracker; _processFactory = processFactory; Config = config; }
/// <inheritdoc /> public SaveBatchPipelineStep( IJobConfig jobConfig, ILogger logger, IQueueManager queueManager, IProgressMonitor progressMonitor, CancellationToken cancellationToken) : base(jobConfig, logger, queueManager, progressMonitor, cancellationToken) { }
/// <inheritdoc /> /// <summary> /// Initializes a new instance of the <see cref="T:DummyMappingUploadPipelineStep.DummyMappingUploadPipelineStep" /> class. /// </summary> /// <param name="jobConfig"> /// The queue context. /// </param> /// <param name="logger"> /// The logger. /// </param> /// <param name="queueManager"> /// The queue Manager. /// </param> /// <param name="progressMonitor"></param> /// <param name="cancellationToken"></param> public DummyMappingUploadPipelineStep( IJobConfig jobConfig, ILogger logger, IQueueManager queueManager, IProgressMonitor progressMonitor, CancellationToken cancellationToken) : base(jobConfig, logger, queueManager, progressMonitor, cancellationToken) { }
/// <inheritdoc /> /// <summary> /// Initializes a new instance of the <see cref="T:FileSavePipelineStep.FileSavePipelineStep" /> class. /// </summary> /// <param name="jobConfig"> /// The queue context. /// </param> /// <param name="logger"> /// The logger. /// </param> /// <param name="queueManager"> /// The queue manager. /// </param> /// <param name="progressMonitor"> /// The progress monitor. /// </param> /// <param name="fileWriter"></param> /// <param name="cancellationToken"></param> public FileSavePipelineStep( IJobConfig jobConfig, ILogger logger, IQueueManager queueManager, IProgressMonitor progressMonitor, ITemporaryFileWriter fileWriter, CancellationToken cancellationToken) : base(jobConfig, logger, queueManager, progressMonitor, cancellationToken) { this.fileWriter = fileWriter ?? throw new ArgumentNullException(nameof(fileWriter)); }
/// <inheritdoc /> /// <summary> /// Initializes a new instance of the <see cref="T:SqlJobPipelineStep.SqlJobPipelineStep" /> class. /// </summary> /// <param name="jobConfig"> /// The queue context. /// </param> /// <param name="logger"> /// The logger. /// </param> /// <param name="queueManager"> /// The queue Manager. /// </param> /// <param name="progressMonitor"> /// The progress Monitor. /// </param> /// <param name="databusSqlReader"></param> /// <param name="cancellationToken"></param> public SqlJobPipelineStep( IJobConfig jobConfig, ILogger logger, IQueueManager queueManager, IProgressMonitor progressMonitor, IDatabusSqlReader databusSqlReader, CancellationToken cancellationToken) : base(jobConfig, logger, queueManager, progressMonitor, cancellationToken) { this.databusSqlReader = databusSqlReader ?? throw new ArgumentNullException(nameof(databusSqlReader)); }
/// <inheritdoc /> /// <summary> /// Initializes a new instance of the <see cref="T:FileUploadPipelineStep.FileUploadPipelineStep" /> class. /// </summary> /// <param name="jobConfig"> /// The queue context. /// </param> /// <param name="elasticSearchUploader"> /// The elasticSearchUploader /// </param> /// <param name="logger"> /// The logger. /// </param> /// <param name="queueManager"> /// The queue Manager. /// </param> /// <param name="progressMonitor"></param> /// <param name="cancellationToken"></param> public FileUploadPipelineStep( IJobConfig jobConfig, IElasticSearchUploader elasticSearchUploader, ILogger logger, IQueueManager queueManager, IProgressMonitor progressMonitor, CancellationToken cancellationToken) : base(jobConfig, logger, queueManager, progressMonitor, cancellationToken) { this.elasticSearchUploader = elasticSearchUploader; }
protected void WorkerRestart(IJobConfig config) { var processList = _processLists.FirstOrDefault(o => o.Config.Id == config.Id); if (processList is null) { AddMissingMonitors(); return; } processList.UpdateConfig(config); }
/// <inheritdoc /> /// <summary> /// Initializes a new instance of the <see cref="T:SqlBatchPipelineStep.SqlBatchPipelineStep" /> class. /// </summary> /// <param name="jobConfig"> /// The queue context. /// </param> /// <param name="logger"> /// The logger. /// </param> /// <param name="queueManager"></param> /// <param name="progressMonitor"></param> /// <param name="fileWriter"></param> /// <param name="cancellationToken"></param> public SqlBatchPipelineStep( IJobConfig jobConfig, ILogger logger, IQueueManager queueManager, IProgressMonitor progressMonitor, IDetailedTemporaryFileWriter fileWriter, CancellationToken cancellationToken) : base(jobConfig, logger, queueManager, progressMonitor, cancellationToken) { this.fileWriter = fileWriter ?? throw new ArgumentNullException(nameof(fileWriter)); this.folder = Path.Combine(this.Config.LocalSaveFolder, $"{this.UniqueId}-SqlBatch"); }
/// <inheritdoc /> public SendToRestApiPipelineStep( IJobConfig jobConfig, ILogger logger, IQueueManager queueManager, IProgressMonitor progressMonitor, IFileUploader fileUploader, IEntityJsonWriter entityJsonWriter, CancellationToken cancellationToken) : base(jobConfig, logger, queueManager, progressMonitor, cancellationToken) { this.fileUploader = fileUploader ?? throw new System.ArgumentNullException(nameof(fileUploader)); this.entityJsonWriter = entityJsonWriter ?? throw new System.ArgumentNullException(nameof(entityJsonWriter)); }
/// <inheritdoc /> public CreateBatchItemsPipelineStep( IJobConfig jobConfig, ILogger logger, IQueueManager queueManager, IProgressMonitor progressMonitor, CancellationToken cancellationToken) : base(jobConfig, logger, queueManager, progressMonitor, cancellationToken) { if (this.Config.EntitiesPerUploadFile < 1) { throw new ArgumentException(nameof(this.Config.EntitiesPerUploadFile)); } }
/// <inheritdoc /> /// <summary> /// Initializes a new instance of the <see cref="T:ConvertDatabaseRowToJsonPipelineStep.ConvertDatabaseRowToJsonPipelineStep" /> class. /// </summary> /// <param name="jobConfig"> /// The queue context. /// </param> /// <param name="logger"> /// The logger. /// </param> /// <param name="queueManager"></param> /// <param name="progressMonitor"></param> /// <param name="entityJsonWriter"></param> /// <param name="fileWriter"></param> /// <param name="cancellationToken"></param> public ConvertDatabaseRowToJsonPipelineStep( IJobConfig jobConfig, ILogger logger, IQueueManager queueManager, IProgressMonitor progressMonitor, IEntityJsonWriter entityJsonWriter, IDetailedTemporaryFileWriter fileWriter, CancellationToken cancellationToken) : base(jobConfig, logger, queueManager, progressMonitor, cancellationToken) { this.entityJsonWriter = entityJsonWriter ?? throw new ArgumentNullException(nameof(entityJsonWriter)); this.fileWriter = fileWriter ?? throw new ArgumentNullException(nameof(fileWriter)); this.folder = Path.Combine(this.Config.LocalSaveFolder, $"{this.UniqueId}-ConvertToJson"); }
/// <inheritdoc /> /// <summary> /// Initializes a new instance of the <see cref="T:SaveSchemaPipelineStep.SaveSchemaPipelineStep" /> class. /// </summary> /// <param name="jobConfig"> /// The queue context. /// </param> /// <param name="logger"> /// The logger. /// </param> /// <param name="queueManager"> /// The queue Manager. /// </param> /// <param name="progressMonitor"></param> /// <param name="fileWriter"></param> /// <param name="entityJsonWriter"></param> /// <param name="cancellationToken"></param> public SaveSchemaPipelineStep( IJobConfig jobConfig, ILogger logger, IQueueManager queueManager, IProgressMonitor progressMonitor, ITemporaryFileWriter fileWriter, IEntityJsonWriter entityJsonWriter, CancellationToken cancellationToken) : base(jobConfig, logger, queueManager, progressMonitor, cancellationToken) { this.fileWriter = fileWriter ?? throw new ArgumentNullException(nameof(fileWriter)); this.entityJsonWriter = entityJsonWriter ?? throw new ArgumentNullException(nameof(entityJsonWriter)); this.folder = Path.Combine(this.Config.LocalSaveFolder, $"{this.UniqueId}-{LoggerName}"); this.fileWriter.CreateDirectory(this.folder); }
private Timer _blockPollerTimer; // timer for polling new blocks. public JobManager(IPoolConfig poolConfig, IDaemonClient daemonClient, IJobTracker jobTracker, IShareManager shareManager, IMinerManager minerManager, IHashAlgorithm hashAlgorithm) { _daemonClient = daemonClient; _jobTracker = jobTracker; _shareManager = shareManager; _minerManager = minerManager; _hashAlgorithm = hashAlgorithm; _poolConfig = poolConfig; _jobConfig = poolConfig.Job; _jobCounter = new JobCounter(); // todo make this ioc based too. _logger = Log.ForContext <JobManager>().ForContext("Component", poolConfig.Coin.Name); }
/// <inheritdoc /> /// <summary> /// Initializes a new instance of the <see cref="T:MappingUploadPipelineStep.MappingUploadPipelineStep" /> class. /// </summary> /// <param name="jobConfig"> /// The queue context. /// </param> /// <param name="logger"> /// The logger. /// </param> /// <param name="elasticSearchUploader"></param> /// <param name="queueManager"></param> /// <param name="progressMonitor"></param> /// <param name="cancellationToken"></param> public MappingUploadPipelineStep( IJobConfig jobConfig, ILogger logger, IElasticSearchUploader elasticSearchUploader, IQueueManager queueManager, IProgressMonitor progressMonitor, CancellationToken cancellationToken) : base(jobConfig, logger, queueManager, progressMonitor, cancellationToken) { this.elasticSearchUploader = elasticSearchUploader ?? throw new ArgumentNullException(nameof(elasticSearchUploader)); this.folder = Path.Combine(this.Config.LocalSaveFolder, $"{this.UniqueId}-{LoggerName}"); if (this.Config.WriteDetailedTemporaryFilesToDisk) { Directory.CreateDirectory(this.folder); } }
/// <inheritdoc /> public SqlGetSchemaPipelineStep( IJobConfig jobConfig, ILogger logger, IElasticSearchUploader elasticSearchUploader, IQueueManager queueManager, IProgressMonitor progressMonitor, ISchemaLoader schemaLoader, IDetailedTemporaryFileWriter fileWriter, CancellationToken cancellationToken) : base(jobConfig, logger, queueManager, progressMonitor, cancellationToken) { this.elasticSearchUploader = elasticSearchUploader ?? throw new ArgumentNullException(nameof(elasticSearchUploader)); this.schemaLoader = schemaLoader ?? throw new ArgumentNullException(nameof(schemaLoader)); this.fileWriter = fileWriter ?? throw new ArgumentNullException(nameof(fileWriter)); this.folder = Path.Combine(this.Config.LocalSaveFolder, $"{this.UniqueId}-{LoggerName}"); this.fileWriter.CreateDirectory(this.folder); }
/// <summary> /// Initializes a new instance of the <see cref="BasePipelineStep{TQueueInItem,TQueueOutItem}"/> class. /// </summary> /// <param name="jobConfig"> /// The queue context. /// </param> /// <param name="logger"> /// The logger /// </param> /// <param name="queueManager"> /// The queue manager /// </param> /// <param name="progressMonitor"> /// The progress Monitor. /// </param> /// <param name="cancellationToken"> /// The cancellation Token. /// </param> protected BasePipelineStep( IJobConfig jobConfig, ILogger logger, IQueueManager queueManager, IProgressMonitor progressMonitor, CancellationToken cancellationToken) { this.queueManager = queueManager ?? throw new ArgumentNullException(nameof(jobConfig)); this.progressMonitor = progressMonitor ?? throw new ArgumentNullException(nameof(progressMonitor)); this.cancellationToken = cancellationToken; this.Config = jobConfig; if (this.Config == null) { throw new ArgumentNullException(nameof(this.Config)); } this.id = queueManager.GetUniqueId(); this.MyLogger = logger ?? throw new ArgumentNullException(nameof(logger)); }
/// <inheritdoc /> public JsonDocumentMergerPipelineStep( IJobConfig jobConfig, ILogger logger, IQueueManager queueManager, IProgressMonitor progressMonitor, IDocumentDictionary documentDictionary, IEntityJsonWriter entityJsonWriter, IDetailedTemporaryFileWriter fileWriter, CancellationToken cancellationToken) : base(jobConfig, logger, queueManager, progressMonitor, cancellationToken) { this.documentDictionary = documentDictionary ?? throw new ArgumentNullException(nameof(documentDictionary)); this.entityJsonWriter = entityJsonWriter ?? throw new ArgumentNullException(nameof(entityJsonWriter)); this.fileWriter = fileWriter ?? throw new ArgumentNullException(nameof(fileWriter)); var configLocalSaveFolder = this.Config.LocalSaveFolder; if (configLocalSaveFolder == null) { throw new ArgumentNullException(nameof(this.Config.LocalSaveFolder)); } this.folder = Path.Combine(configLocalSaveFolder, $"{this.UniqueId}-JsonDocumentMerge"); }
protected abstract ProcessThreadList NewThreadList(IJobConfig config);
public ProcessThreadForTesting(ProcessStartInfo processStartInfo, IChildProcessTracker childProcessTracker, IProcessFactory processFactory, IJobConfig config) : base(childProcessTracker, processFactory, config) { _testProcessInfo = processStartInfo; }
public QueueProcessThread(IChildProcessTracker childProcessTracker, IProcessFactory processFactory, IJobConfig config) : base(childProcessTracker, processFactory, config) { }
public QueueProcessThreadList(IChildProcessTracker childProcessTracker, IProcessFactory processFactory, IJobConfig config) : base(config) { _childProcessTracker = childProcessTracker; _processFactory = processFactory; }
protected override ProcessThreadList NewThreadList(IJobConfig config) => new QueueProcessThreadList(_childProcessTracker, _processFactory, config);
public ProcessThreadListForTesting(IJobConfig config, ITestProcessFactory testProcessFactory) : base(config) { _testProcessFactory = testProcessFactory; }
public ProcessThreadForTesting(IJobConfig config) { _config = config; }
protected ProcessThreadList(IJobConfig config) { UpdateConfig(config); _running = true; }
public DbJobStorage(IJobConfig config) : base(config) { }
public LoggingServiceMonitor(IChildProcessTracker childProcessTracker, IProcessFactory processFactory, IJobConfig config) : base(childProcessTracker, processFactory, config) { }
public JsonJobStorage(IJobConfig config) : base(config) { }