Documentation
¶
Index ¶
- func Add(typename string, params any, priority ...Priority) *asynq.TaskInfo
- func AddDelay(typename string, params any, t time.Duration, priority ...Priority) *asynq.TaskInfo
- func AddTask(typename string, params any, opts ...asynq.Option) *asynq.TaskInfo
- func AddTime(typename string, params any, t time.Time, priority ...Priority) *asynq.TaskInfo
- func DelTask(priority Priority, id string) error
- func Init()
- func ListenerScheduler(cron string, typename string, params any, priority ...Priority)
- func ListenerTask(pattern string, handler func(context.Context, *asynq.Task) error)
- func Register()
- func StartQueue()
- func StartScheduler()
- type Priority
- type TaskLogger
- type TaskService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ListenerScheduler ¶
ListenerScheduler registers a task to be executed on a schedule cron: the schedule for the task typename: the name of the task type params: parameters for the task (can be of any type) priority: (optional) the priority group for the task
func ListenerTask ¶
ListenerTask registers a task to be executed on a queue
func StartQueue ¶
func StartQueue()
func StartScheduler ¶
func StartScheduler()
Types ¶
type TaskLogger ¶
func (*TaskLogger) Debug ¶
func (t *TaskLogger) Debug(args ...interface{})
func (*TaskLogger) Error ¶
func (t *TaskLogger) Error(args ...interface{})
func (*TaskLogger) Fatal ¶
func (t *TaskLogger) Fatal(args ...interface{})
func (*TaskLogger) Info ¶
func (t *TaskLogger) Info(args ...interface{})
func (*TaskLogger) Warn ¶
func (t *TaskLogger) Warn(args ...interface{})
Click to show internal directories.
Click to hide internal directories.