public IEnumerable <IQuery> Queries() { try { _executionContextConfigurator.ConfigureFor(_tenantResolver.Resolve(HttpContext.Request), Dolittle.Execution.CorrelationId.New(), ClaimsPrincipal.Current.ToClaims()); return(_queries.ToList()); } catch (Exception ex) { _logger.Error(ex, $"Error listing queries."); throw; } }
void ProcessInParallel() { //_logger.Information("Process") Parallel.ForEach(_systemsThatKnowAboutEventProcessors.ToList(), (system) => { Parallel.ForEach(system.ToList(), (processor) => { Parallel.ForEach(_tenants.All, (t) => { _executionContextManager.CurrentFor(t, CorrelationId.New(), Claims.Empty); _processingHub.Register(new ScopedEventProcessor(t, processor, _getOffsetRepository, _getUnprocessedEventsFetcher, _logger)); }); }); }); }