cron

package
v1.4.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 10, 2020 License: EUPL-1.2, ISC, MIT, + 1 more Imports: 19 Imported by: 0

Documentation

Overview

Package cron schedules jobs.

Index

Constants

This section is empty.

Variables

View Source
var LastMemstore lastMemstore

Functions

func DataRetention

func DataRetention(ctx context.Context) error

func PersistAndStat

func PersistAndStat(ctx context.Context) error

func ReindexStats

func ReindexStats(ctx context.Context, site goatcounter.Site, hits []goatcounter.Hit, tables []string) error

ReindexStats re-indexes all the statistics for the given tables; this is intended to be run by the "goatcounter reindex" command.

func RunBackground

func RunBackground(db zdb.DB)

RunBackground runs tasks in the background according to the given schedule.

func RunOnce

func RunOnce(db zdb.DB)

RunOnce runs all tasks once and returns.

func UpdateStats

func UpdateStats(ctx context.Context, site *goatcounter.Site, siteID int64, hits []goatcounter.Hit, isReindex bool) error

func Wait

func Wait(db zdb.DB)

Wait for all running tasks to finish and then run all tasks for consistency on shutdown.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL