tasks

package
v0.0.0-...-2c08a0f Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LinkHealth

func LinkHealth(db *sqlx.DB) (err error)

LinkHealth checks if the expired links are still valid.

func RestorePostponedLinks(db *sqlx.DB) (err error)

RestorePostponedLinks revamp rescheduled links in the inbox.

func Run

func Run(db *sqlx.DB)

Run executes background maintenance tasks.

func Vacuum

func Vacuum(db *sqlx.DB) (err error)

Vacuum executes a SQLite3 vacuum clean up.

Types

type Task

type Task struct {
	Name      string
	Exec      func(db *sqlx.DB) error
	Frequency time.Duration
}

Task represents one periodic task executed by the runner. Key must be unique, as it is used as key to lock.

Jump to

Keyboard shortcuts

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