job

package
v0.0.0-...-5f48557 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2018 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LastRun

func LastRun(ctx context.Context, name string) int64

LastRun retrieves the timestamp a job has last run

func ScheduleJob

func ScheduleJob(ctx context.Context, q, req string)

ScheduleJob creates a background job

func UpdateLastRun

func UpdateLastRun(ctx context.Context, name string, ts int64) error

UpdateLastRun updates the job with a timestamp when it has last run

Types

type Job

type Job struct {
	Name    string
	Count   int
	LastRun int64
}

Job holds information about a (periodic) job

Jump to

Keyboard shortcuts

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