WithHandler sets the task handler for the TaskQueue
(fn func(ctx context.Context, t task.Task) TaskResult)
| 148 | |
| 149 | // WithHandler sets the task handler for the TaskQueue |
| 150 | func WithHandler(fn func(ctx context.Context, t task.Task) TaskResult) TaskQueueOption { |
| 151 | return func(q *TaskQueue) { |
| 152 | q.Handler = fn |
| 153 | } |
| 154 | } |
| 155 | |
| 156 | // WithCompactableTypes sets the compactable task types for the TaskQueue |
| 157 | func WithCompactableTypes(taskTypes ...task.TaskType) TaskQueueOption { |