backend

package
v0.0.0-...-60360ff Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	SUCCESS  = 0
	PENDING  = 1
	RECEIVED = 2
	STARTED  = 3
	RETRY    = 4
	FAILURE  = 5
)
View Source
var BackendServer iface.Backend
View Source
var SenderServer *machinery.Server

Functions

func GetErrorFromBackend

func GetErrorFromBackend(taskUUID string) (taskError string, err error)

GetErrorFromBackend when task is FAILURE, get state of task from backend

func GetResultsFromBackend

func GetResultsFromBackend(taskUUID string) (taskResults string, err error)

GetResultsFromBackend when task is SUCCESS, get results of task from backend

func GetStateFromBackend

func GetStateFromBackend(taskUUID string) (state int, err error)

GetStateFromBackend get state of task from backend

func GetTaskInfos

func GetTaskInfos() (infos []models.Task)

GetTaskInfos get statks from DB

func TaskRunTimeout

func TaskRunTimeout(taskUUID string, taskCreateOn int) bool

TaskRunTimeout if task is send success, duration TASK_TIMEOUT, task is not FAILURE or SUCCESS.

func UpdateState

func UpdateState()

UpdateState update state of task

func UpdateStateToDB

func UpdateStateToDB(dataTask models.Task) error

UpdateStateToDB update info of task in DB

Types

This section is empty.

Jump to

Keyboard shortcuts

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