You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can also pass an existing IORedis instance instead of connection options. This is useful when you need more control over the Redis connection configuration:
147
+
148
+
```ts
149
+
import { Connect } from"taskforce-connector";
150
+
importRedisfrom"ioredis";
151
+
152
+
// Create your own Redis instance with custom configuration
153
+
const redisClient =newRedis({
154
+
host: "my redis host",
155
+
port: 6379,
156
+
password: "my redis password",
157
+
// Any other IORedis options...
158
+
maxRetriesPerRequest: null,
159
+
enableReadyCheck: false,
160
+
});
161
+
162
+
const taskforceConnection =Connect("my connection", "my token", redisClient);
163
+
```
164
+
165
+
This also works with Redis Cluster:
166
+
167
+
```ts
168
+
import { Connect } from"taskforce-connector";
169
+
importRedisfrom"ioredis";
170
+
171
+
const cluster =newRedis.Cluster([
172
+
{ host: "node1", port: 6379 },
173
+
{ host: "node2", port: 6379 },
174
+
]);
175
+
176
+
const taskforceConnection =Connect("my connection", "my token", cluster);
177
+
```
178
+
144
179
If you are using the On Premises version of Taskforce, you can also specify the backend domain:
0 commit comments