Documentation ¶
Overview ¶
Package cron schedules jobs.
Index ¶
- Variables
- func SetPersistInterval(d time.Duration)
- func Start(ctx context.Context)
- func Stop() error
- func TaskACME() error
- func TaskDataRetention() error
- func TaskEmailReports() error
- func TaskOldExports() error
- func TaskPersistAndStat() error
- func TaskSessions() error
- func TaskVacuumOldSites() error
- func UpdateStats(ctx context.Context, site *goatcounter.Site, siteID int64, ...) error
- func WaitACME()
- func WaitDataRetention()
- func WaitEmailReports()
- func WaitOldExports()
- func WaitPersistAndStat()
- func WaitSessions()
- func WaitVacuumOldSites()
- type Task
Constants ¶
This section is empty.
Variables ¶
View Source
var Tasks = []Task{ {"vacuum pageviews (data retention)", dataRetention, 1 * time.Hour}, {"renew ACME certs", renewACME, 2 * time.Hour}, {"vacuum soft-deleted sites", vacuumDeleted, 12 * time.Hour}, {"rm old exports", oldExports, 1 * time.Hour}, {"cycle sessions", sessions, 1 * time.Minute}, {"send email reports", emailReports, 1 * time.Hour}, {"persist hits", persistAndStat, time.Duration(persistInterval.Load())}, }
Functions ¶
func SetPersistInterval ¶ added in v2.4.1
func TaskDataRetention ¶ added in v2.4.1
func TaskDataRetention() error
func TaskEmailReports ¶ added in v2.4.1
func TaskEmailReports() error
func TaskOldExports ¶ added in v2.4.1
func TaskOldExports() error
func TaskPersistAndStat ¶ added in v2.4.1
func TaskPersistAndStat() error
func TaskSessions ¶ added in v2.4.1
func TaskSessions() error
func TaskVacuumOldSites ¶ added in v2.4.1
func TaskVacuumOldSites() error
func UpdateStats ¶
func UpdateStats(ctx context.Context, site *goatcounter.Site, siteID int64, hits []goatcounter.Hit) error
UpdateStats updates all the stats tables.
Exported for tests.
func WaitDataRetention ¶ added in v2.4.1
func WaitDataRetention()
func WaitEmailReports ¶ added in v2.4.1
func WaitEmailReports()
func WaitOldExports ¶ added in v2.4.1
func WaitOldExports()
func WaitPersistAndStat ¶ added in v2.4.1
func WaitPersistAndStat()
func WaitSessions ¶ added in v2.4.1
func WaitSessions()
func WaitVacuumOldSites ¶ added in v2.4.1
func WaitVacuumOldSites()
Types ¶
Click to show internal directories.
Click to hide internal directories.