Ejemplo n.º 1
0
 protected override Task ExecuteAsync(CancellationToken stoppingToken)
 {
     СurrentLogger.Info($"Starting {ServiceName}.");
     return(Bus.StartAsync(stoppingToken).ContinueWith(x => {
         СurrentLogger.Info("Started bus.");
     }));
 }
        protected override Task ExecuteAsync(CancellationToken stoppingToken)
        {
            СurrentLogger.Info("Starting migrations.");
            _migrationRunner.MigrateUp();
            СurrentLogger.Info("Finished with migrations");

            return(base.ExecuteAsync(stoppingToken));
        }
Ejemplo n.º 3
0
 public override Task StopAsync(CancellationToken cancellationToken)
 {
     СurrentLogger.Info($"Stopping {ServiceName}.");
     return(Task.WhenAll(base.StopAsync(cancellationToken), Bus.StopAsync(cancellationToken)));
 }