DispatchTask returns a task that calls Dispatch with the provided consumerID.
(q TaskQueue, consumerID string)
| 25 | |
| 26 | // DispatchTask returns a task that calls Dispatch with the provided consumerID. |
| 27 | func DispatchTask(q TaskQueue, consumerID string) task.Func { |
| 28 | return func(ctx context.Context) error { |
| 29 | return q.Dispatch(ctx, consumerID) |
| 30 | } |
| 31 | } |
| 32 | |
| 33 | // PopTask returns a task that calls Pop with the provided consumerID. |
| 34 | func PopTask(q TaskQueue, consumerID string) task.Func { |