Documentation
¶
Overview ¶
Package scheduler provides the periodic full-scan pipeline, DB maintenance, and auth cleanup scheduling for the subflux server.
Index ¶
Constants ¶
View Source
const AuthCleanupInterval = 15 * time.Minute
AuthCleanupInterval is how often expired sessions and stale auth state are purged from the database.
View Source
const OIDCStateTTL = 10 * time.Minute
OIDCStateTTL is how long an OIDC authorization flow can remain pending before garbage collection.
View Source
const StartupDelay = 30 * time.Second
StartupDelay is the delay before the first scan after startup.
Variables ¶
This section is empty.
Functions ¶
func GuardedScan ¶
GuardedScan acquires the scanning flag before running a full scan.
func RunDBMaintenance ¶
RunDBMaintenance prunes old state and stale search attempts.
func RunFullScan ¶
RunFullScan delegates to the scanning package's RunFullScan.
Types ¶
type Deps ¶
type Deps struct {
DB api.Store
Metrics scanning.ScanMetrics
Events *serveradapter.ScanEventAdapter
Activity *serveradapter.ActivityAdapter
Alerts *serveradapter.AlertAdapter
ShowSkipCache *showskip.Cache
StateFunc func() *LiveState
ScanningFlag *atomic.Bool
DeleteSubtitleFiles func(paths []string, source string)
}
Deps holds all dependencies for the scheduler.
Click to show internal directories.
Click to hide internal directories.