runner

package
v0.0.0-...-dafb618 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2018 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const InterviewExpiry = time.Hour * 24 * 7

Interviews expire after one week

View Source
const InterviewReminderLead = time.Hour

InterviewReminders will be send out 1 hour before the interview

Variables

This section is empty.

Functions

This section is empty.

Types

type Runner

type Runner struct {
	Name string
	// contains filtered or unexported fields
}

Runner objects manage running operations asynchronously, similar to a daemon

func NewCleanupRunner

func NewCleanupRunner(store db.Store) *Runner

NewCleanupRunner returns a runner that removes old data from the specified store. This includes deleting interviews that are older than one week.

func NewReminderRunner

func NewReminderRunner(store db.Store, client utils.SlackClient) *Runner

NewReminderRunner will return a runner that will send reminders to slack users. Each time the runner executes, it will read from the store and

func NewRunner

func NewRunner(name string, run func() error) *Runner

NewRunner will create a new Runner object with the specified name and run function

func (*Runner) Run

func (r *Runner) Run() error

Run executes the runner's function

func (*Runner) RunEvery

func (r *Runner) RunEvery(d time.Duration) *time.Ticker

RunEvery will execute the runner's function at the specified interval

Jump to

Keyboard shortcuts

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