2023-06-19 14:42:47 -07:00
|
|
|
// SPDX-FileCopyrightText: Copyright The Miniflux Authors. All rights reserved.
|
|
|
|
// SPDX-License-Identifier: Apache-2.0
|
2017-11-19 21:10:04 -08:00
|
|
|
|
2023-08-10 19:46:45 -07:00
|
|
|
package model // import "miniflux.app/v2/internal/model"
|
2017-11-19 21:10:04 -08:00
|
|
|
|
2017-11-21 22:36:00 -08:00
|
|
|
// Job represents a payload sent to the processing queue.
|
2017-11-19 21:10:04 -08:00
|
|
|
type Job struct {
|
2025-08-08 12:19:01 -07:00
|
|
|
UserID int64
|
|
|
|
FeedID int64
|
|
|
|
FeedURL string
|
2017-11-19 21:10:04 -08:00
|
|
|
}
|
2017-11-21 22:36:00 -08:00
|
|
|
|
|
|
|
// JobList represents a list of jobs.
|
|
|
|
type JobList []Job
|
2025-08-08 12:19:01 -07:00
|
|
|
|
|
|
|
// 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
|
|
|
|
}
|