Documentation ¶
Overview ¶
Package scheduler implements the application internal scheduler.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewFeedScheduler ¶
func NewFeedScheduler(store *storage.Storage, workerPool *WorkerPool, frequency, batchSize int)
NewFeedScheduler starts a new scheduler that push jobs to a pool of workers.
func NewSessionScheduler ¶
NewSessionScheduler starts a new scheduler that clean old sessions.
Types ¶
type Worker ¶
type Worker struct {
// contains filtered or unexported fields
}
Worker refreshes a feed in the background.
type WorkerPool ¶
type WorkerPool struct {
// contains filtered or unexported fields
}
WorkerPool handle a pool of workers.
func NewWorkerPool ¶
func NewWorkerPool(feedHandler *feed.Handler, nbWorkers int) *WorkerPool
NewWorkerPool creates a pool of background workers.
func (*WorkerPool) Push ¶
func (w *WorkerPool) Push(jobs model.JobList)
Push send a list of jobs to the queue.
Click to show internal directories.
Click to hide internal directories.