public WorkerHeartbeat(IWorkerContainer container, TimeSpan heartbeatInterval) { _container = container; if (_heartbeatInterval.TotalSeconds < MinimalIntervalInSeconds) throw new InvalidOperationException($"Cannot heartbeat often than {MinimalIntervalInSeconds}"); _heartbeatInterval = heartbeatInterval; StartHeartbeat(); }
public SynchronousWorkCoordinator(ITypeFinder typeFinder, ISeriesBuilder seriesBuilder, IPublisherProvider publishers, IWorkerContainer workers) : base(typeFinder, publishers, workers) { _seriesBuilder = seriesBuilder; publishers.ProgressChanged += (sender, e) => ProgressChanged?.Invoke(sender, e); publishers.Starting += OnStarting; }
public WorkerHeartbeat(IWorkerContainer container, TimeSpan heartbeatInterval) { _container = container; if (_heartbeatInterval.TotalSeconds < MinimalIntervalInSeconds) { throw new InvalidOperationException($"Cannot heartbeat often than {MinimalIntervalInSeconds}"); } _heartbeatInterval = heartbeatInterval; StartHeartbeat(); }
public CoreCoordinator(ITypeFinder typeFinder, IPublisherProvider publishers, IWorkerContainer workers) { _typeFinder = typeFinder; _publishers = publishers; _publishers.Starting += (sender, e) => Starting?.Invoke(sender, e); _publishers.Finishing += (sender, e) => Finishing?.Invoke(sender, e); _publishers.Finished += (sender, e) => Finished?.Invoke(sender, e); _publishers.ProgressChanged += (sender, e) => ProgressChanged?.Invoke(sender, e); _publishers.PublisherAdded += (o, e) => PublisherAdded?.Invoke(o, e); _publishers.Cancelling += (o, e) => Cancelling?.Invoke(o, e); _workers = workers; }
public ChainedWorkCoordinator(ITypeFinder typeFinder, IPublisherProvider publishers, IWorkerContainer workers, IDirectSeriesProcessor <TInput> processor) : base(typeFinder, publishers, workers) { _nullArgs = new EventArgs(); _processor = processor; _progressives = new List <IProgressive>(); _pendingRecords = new ConcurrentQueue <TInput>(); _seriesProcessors = new ConcurrentQueue <ISeriesProcessor>(); _recordSizes = new ConcurrentDictionary <TInput, Int64>(); publishers.ProgressChanged += OnProgressChanged; publishers.Starting += OnStarting; publishers.Finishing += (sender, e) => Finishing?.Invoke(sender, e); publishers.Finished += OnPublishersFinished; }
public HomeController(IWorkerContainer es, ILogger <HomeController> logger) { _es = es; _logger = logger; }