1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-07-27 17:28:38 +00:00

Add the possibility to run Miniflux as a cronjob

This commit is contained in:
Frédéric Guillot 2023-06-24 22:06:48 -07:00
parent c3250257b1
commit c85b19098d
3 changed files with 28 additions and 2 deletions

View file

@ -38,10 +38,10 @@ func Serve(store *storage.Storage, pool *worker.Pool) {
func feedScheduler(store *storage.Storage, pool *worker.Pool, frequency, batchSize int) {
for range time.Tick(time.Duration(frequency) * time.Minute) {
jobs, err := store.NewBatch(batchSize)
logger.Info("[Scheduler:Feed] Pushing %d jobs to the queue", len(jobs))
if err != nil {
logger.Error("[Scheduler:Feed] %v", err)
} else {
logger.Debug("[Scheduler:Feed] Pushing %d jobs", len(jobs))
pool.Push(jobs)
}
}