public DeletedCleanupService( ILogger <DeletedCleanupService> logger, IServiceScopeFactory factory, IOptions <ServiceDurations> durations) { this.logger = logger; this.factory = factory; serviceDurations = durations.Value; timer = new Timer(Trigger, null, TimeSpan.Zero, TimeSpan.FromMinutes(this.serviceDurations.DeleteServiceInMinutes)); }
public RefreshTokenCleanupService( IServiceScopeFactory scopeFactory, IOptions <JwtOptions> jwtOptions, IOptions <ServiceDurations> durations, ILogger <RefreshTokenCleanupService> logger) { factory = scopeFactory; this.logger = logger; this.jwtOptions = jwtOptions.Value; serviceDurations = durations.Value; timer = new Timer(Trigger, null, TimeSpan.Zero, TimeSpan.FromMinutes(this.serviceDurations.CleanupTokensInMinutes)); }
public MovieSyncingService( IServiceScopeFactory factory, ITheMovieDb tmdb, ILogger <MovieSyncingService> logger, IOptions <ServiceDurations> durations) { this.factory = factory; tmdbApi = tmdb; serviceDurations = durations.Value; this.logger = logger; timer = new Timer( Trigger, null, TimeSpan.Zero, TimeSpan.FromSeconds(serviceDurations.DatabaseSeedingInMinutes)); }