tasks

package
v0.0.0-...-9b06841 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FetcherTaskPusher

func FetcherTaskPusher(c *asynq.Client, fetchType int, id int64, updateAfter string, searchLimit int64) (err error)

func GetNewAPITaskKey

func GetNewAPITaskKey(fetchType int, id int64, reqId string) string

func GetNewFetcherTaskKey

func GetNewFetcherTaskKey(fetchType int, id int64) string

func NewAPITask

func NewAPITask(fetchType int, id int64, reqId string) (*asynq.Task, string, error)

func NewFetcherTask

func NewFetcherTask(fetchType int, id int64, updateAfter string, searchLimit int64) (*asynq.Task, string, error)

Types

type APIPayload

type APIPayload struct {
	Type   int    `json:"type"`
	Id     int64  `json:"id"`
	TaskId string `json:"taskId"`
}

type FetchPayload

type FetchPayload struct {
	Type        int    `json:"type"`
	Id          int64  `json:"id"`
	UpdateAfter string `json:"updateAfter"`
	SearchLimit int64  `json:"searchLimit"`
}

Jump to

Keyboard shortcuts

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