jobs

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2018 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultQueue = "default"
)

constants

View Source
const (
	MessagingWorker = "worker.Messaging"
)

default constants

View Source
const (
	TimerWorker = "worker.Timer"
)

default constants

Variables

This section is empty.

Functions

func QueueMessaging

func QueueMessaging(id interface{}) error

QueueMessaging enqueues new mailing job of messages for given member.

func QueueTimer

func QueueTimer(sec time.Duration) error

QueueTimer enqueues new sample timer job to queue.

func RegisterAll

func RegisterAll(app *buffalo.App)

RegisterAll register all workers

Types

type Handler

type Handler struct {
	Name    string
	Running int
	Success int
}

Handler is structure storing handler statistics data

func (*Handler) RegisterMessaging

func (h *Handler) RegisterMessaging() error

RegisterMessaging register this background job handler.

func (*Handler) RegisterTimer

func (h *Handler) RegisterTimer() error

RegisterTimer register this background job handler.

func (Handler) String

func (h Handler) String() string

type Handlers

type Handlers map[string]*Handler

Handlers is a handler registry (originally a dummy type for holding methods)

Jump to

Keyboard shortcuts

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