mirror of
https://github.com/miniflux/v2.git
synced 2025-08-11 17:51:01 +00:00
Each batch of feeds sent to the worker pool is now guaranteed to contain unique feed URLs. When `POLLING_LIMIT_PER_HOST` is set, an additional limit is applied to the number of concurrent requests per hostname, helping to prevent overloading a single server. Note: Additional requests may still be made during feed refresh. For example, to fetch feed icons or when the web scraper is enabled for a particular feed.
24 lines
668 B
Go
24 lines
668 B
Go
// SPDX-FileCopyrightText: Copyright The Miniflux Authors. All rights reserved.
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
package model // import "miniflux.app/v2/internal/model"
|
|
|
|
// Job represents a payload sent to the processing queue.
|
|
type Job struct {
|
|
UserID int64
|
|
FeedID int64
|
|
FeedURL string
|
|
}
|
|
|
|
// JobList represents a list of jobs.
|
|
type JobList []Job
|
|
|
|
// FeedURLs returns a list of feed URLs from the job list.
|
|
// This is useful for logging or debugging purposes to see which feeds are being processed.
|
|
func (jl *JobList) FeedURLs() []string {
|
|
feedURLs := make([]string, len(*jl))
|
|
for i, job := range *jl {
|
|
feedURLs[i] = job.FeedURL
|
|
}
|
|
return feedURLs
|
|
}
|