()
| 62 | } |
| 63 | |
| 64 | func Example() { |
| 65 | // The task starter is used for automatic re-subscription on failure. |
| 66 | taskStarter := task.StartTaskFunc(task.DefaultStartTask) |
| 67 | |
| 68 | redisPubSub := redis.NewPubSub(context.TODO(), mockComponent{taskStarter}, config.RedisEvents{ |
| 69 | // Config here... |
| 70 | }, config.BatchEvents{ |
| 71 | // Batch config here... |
| 72 | }) |
| 73 | |
| 74 | // Replace the default pubsub so that we will now publish to Redis. |
| 75 | events.SetDefaultPubSub(redisPubSub) |
| 76 | } |
| 77 | |
| 78 | var timeout = (1 << 11) * test.Delay |
| 79 |
nothing calls this directly
no test coverage detected