public void Start() { _shutdown = false; QueueProvider.Start().Wait(); LockProvider.Start().Wait(); for (int i = 0; i < Options.ThreadCount; i++) { Logger.LogInformation("Starting worker thread #{0}", i); IWorkflowThread thread = _serviceProvider.GetService <IWorkflowThread>(); _workers.Add(thread); thread.Start(); } Logger.LogInformation("Starting publish thread"); IEventThread pubThread = _serviceProvider.GetService <IEventThread>(); _workers.Add(pubThread); pubThread.Start(); Logger.LogInformation("Starting poller"); IRunnablePoller poller = _serviceProvider.GetService <IRunnablePoller>(); _workers.Add(poller); poller.Start(); }
public void Start() { _shutdown = false; PersistenceStore.EnsureStoreExists(); QueueProvider.Start().Wait(); LockProvider.Start().Wait(); Logger.LogInformation("Starting backgroud tasks"); foreach (var task in _backgroundTasks) { task.Start(); } }
public async Task StartAsync(CancellationToken cancellationToken) { _shutdown = false; PersistenceStore.EnsureStoreExists(); await QueueProvider.Start(); await LockProvider.Start(); await _lifeCycleEventHub.Start(); await _searchIndex.Start(); Logger.LogInformation("Starting background tasks"); foreach (var task in _backgroundTasks) { task.Start(); } }
public void Start() { _shutdown = false; QueueProvider.Start(); LockProvider.Start(); for (int i = 0; i < Options.ThreadCount; i++) { Logger.LogInformation("Starting worker thread #{0}", i); Thread thread = new Thread(RunWorkflows); _threads.Add(thread); thread.Start(); } Logger.LogInformation("Starting publish thread"); Thread pubThread = new Thread(RunPublications); _threads.Add(pubThread); pubThread.Start(); _pollTimer = new Timer(new TimerCallback(PollRunnables), null, TimeSpan.FromSeconds(0), Options.PollInterval); }
public async Task StartAsync(CancellationToken cancellationToken) { _shutdown = false; PersistenceStore.EnsureStoreExists(); await QueueProvider.Start(); await LockProvider.Start(); await _lifeCycleEventHub.Start(); await _searchIndex.Start(); // Event subscriptions are removed when stopping the event hub. // Add them when starting. AddEventSubscriptions(); Logger.LogInformation("Starting background tasks"); foreach (var task in _backgroundTasks) { task.Start(); } }
public async Task StartAsync(CancellationToken cancellationToken) { var activity = WorkflowActivity.StartHost(); try { _shutdown = false; PersistenceStore.EnsureStoreExists(); await QueueProvider.Start(); await LockProvider.Start(); await _lifeCycleEventHub.Start(); await _searchIndex.Start(); // Event subscriptions are removed when stopping the event hub. // Add them when starting. AddEventSubscriptions(); Logger.LogInformation("Starting background tasks"); foreach (var task in _backgroundTasks) { task.Start(); } } catch (Exception ex) { activity.RecordException(ex); throw; } finally { activity?.Dispose(); } }