Ejemplo n.º 1
0
 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;
     }
 }
Ejemplo n.º 2
0
 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));
             });
         });
     });
 }