4
0

job.go 668 B

123456789101112131415161718192021222324
  1. // SPDX-FileCopyrightText: Copyright The Miniflux Authors. All rights reserved.
  2. // SPDX-License-Identifier: Apache-2.0
  3. package model // import "miniflux.app/v2/internal/model"
  4. // Job represents a payload sent to the processing queue.
  5. type Job struct {
  6. UserID int64
  7. FeedID int64
  8. FeedURL string
  9. }
  10. // JobList represents a list of jobs.
  11. type JobList []Job
  12. // FeedURLs returns a list of feed URLs from the job list.
  13. // This is useful for logging or debugging purposes to see which feeds are being processed.
  14. func (jl *JobList) FeedURLs() []string {
  15. feedURLs := make([]string, len(*jl))
  16. for i, job := range *jl {
  17. feedURLs[i] = job.FeedURL
  18. }
  19. return feedURLs
  20. }