mirror of
https://github.com/miniflux/v2.git
synced 2025-06-27 16:36:00 +00:00
Refresh feeds in the cronjob in parallel
This commit is contained in:
parent
c85b19098d
commit
3dc8e5ebaf
2 changed files with 52 additions and 13 deletions
14
cli/cli.go
14
cli/cli.go
|
@ -11,7 +11,6 @@ import (
|
|||
"miniflux.app/database"
|
||||
"miniflux.app/locale"
|
||||
"miniflux.app/logger"
|
||||
feedHandler "miniflux.app/reader/handler"
|
||||
"miniflux.app/storage"
|
||||
"miniflux.app/ui/static"
|
||||
"miniflux.app/version"
|
||||
|
@ -192,18 +191,7 @@ func Parse() {
|
|||
}
|
||||
|
||||
if flagCronjob {
|
||||
jobs, err := store.NewBatch(config.Opts.BatchSize())
|
||||
if err != nil {
|
||||
logger.Error("[Cronjob] %v", err)
|
||||
}
|
||||
|
||||
logger.Info("[Cronjob]] Processing %d jobs", len(jobs))
|
||||
|
||||
for _, job := range jobs {
|
||||
if err := feedHandler.RefreshFeed(store, job.UserID, job.FeedID); err != nil {
|
||||
logger.Error("[Cronjob] Refreshing the feed #%d returned this error: %v", job.FeedID, err)
|
||||
}
|
||||
}
|
||||
runCronjob(store)
|
||||
return
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue