Ejemplo n.º 1
0
        Task IHostedService.StartAsync(CancellationToken cancellationToken)
        {
            _logger.LogInformation("Application startup");

            _logger.LogDebug("ZipDeploy wireup package detection");
            _detectPackage.PackageDetected += _triggerRestart.Trigger;

            _logger.Retry(_options, "Delete obsolete files", () =>
                          _cleaner.DeleteObsoleteFiles());

            _logger.Retry(_options, "Start package detection", () =>
                          _detectPackage.Started());

            return(Task.CompletedTask);
        }