mirror of
https://github.com/miniflux/v2.git
synced 2025-06-27 16:36:00 +00:00
Add scheduler to clean old sessions
This commit is contained in:
parent
00257988ef
commit
18f55d1569
5 changed files with 60 additions and 17 deletions
4
main.go
4
main.go
|
@ -47,13 +47,15 @@ func run(cfg *config.Config, store *storage.Storage) {
|
|||
pool := scheduler.NewWorkerPool(feedHandler, cfg.GetInt("WORKER_POOL_SIZE", config.DefaultWorkerPoolSize))
|
||||
server := server.NewServer(cfg, store, pool, feedHandler)
|
||||
|
||||
scheduler.NewScheduler(
|
||||
scheduler.NewFeedScheduler(
|
||||
store,
|
||||
pool,
|
||||
cfg.GetInt("POLLING_FREQUENCY", config.DefaultPollingFrequency),
|
||||
cfg.GetInt("BATCH_SIZE", config.DefaultBatchSize),
|
||||
)
|
||||
|
||||
scheduler.NewSessionScheduler(store, config.DefaultSessionCleanupFrequency)
|
||||
|
||||
<-stop
|
||||
logger.Info("Shutting down the server...")
|
||||
ctx, _ := context.WithTimeout(context.Background(), 5*time.Second)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue