|
@@ -145,7 +145,6 @@ module.exports = { |
|
@@ -145,7 +145,6 @@ module.exports = { |
145
|
apiCache: {
|
145
|
apiCache: {
|
146
|
cache: true
|
146
|
cache: true
|
147
|
},
|
147
|
},
|
148
|
- sessionRedisPrefix: 'yohobuy_session:',
|
|
|
149
|
zookeeperServer: '192.168.102.168:2188',
|
148
|
zookeeperServer: '192.168.102.168:2188',
|
150
|
redis: {
|
149
|
redis: {
|
151
|
connect: {
|
150
|
connect: {
|
|
@@ -164,6 +163,11 @@ module.exports = { |
|
@@ -164,6 +163,11 @@ module.exports = { |
164
|
}
|
163
|
}
|
165
|
return Math.min(options.attempt * 100, 1000);
|
164
|
return Math.min(options.attempt * 100, 1000);
|
166
|
}
|
165
|
}
|
|
|
166
|
+ },
|
|
|
167
|
+ session: {
|
|
|
168
|
+ host: '192.168.102.49',
|
|
|
169
|
+ port: '6379',
|
|
|
170
|
+ prefix: 'yohobuy_session:'
|
167
|
}
|
171
|
}
|
168
|
},
|
172
|
},
|
169
|
REQUEST_LIMIT: {
|
173
|
REQUEST_LIMIT: {
|
|
@@ -206,21 +210,27 @@ if (isProduction) { |
|
@@ -206,21 +210,27 @@ if (isProduction) { |
206
|
zookeeperServer: 'web.zookeeper.yohoops.org:2181',
|
210
|
zookeeperServer: 'web.zookeeper.yohoops.org:2181',
|
207
|
redis: {
|
211
|
redis: {
|
208
|
connect: {
|
212
|
connect: {
|
209
|
- host: 'web.redis.yohoops.org'
|
|
|
210
|
- },
|
|
|
211
|
- port: '6379',
|
|
|
212
|
- retry_strategy(options) {
|
|
|
213
|
- if (options.error && options.error.code === 'ECONNREFUSED') {
|
|
|
214
|
- console.log('redis连接不成功');
|
|
|
215
|
- }
|
|
|
216
|
- if (options.total_retry_time > 1000 * 60 * 60 * 6) {
|
|
|
217
|
- console.log('redis连接超时');
|
|
|
218
|
- return;
|
|
|
219
|
- }
|
|
|
220
|
- if (options.attempt > 10) {
|
|
|
221
|
- return 1000 * 60 * 60 * 0.5;
|
213
|
+ host: 'web.redis.yohoops.org',
|
|
|
214
|
+ port: '6379',
|
|
|
215
|
+ retry_strategy(options) {
|
|
|
216
|
+ if (options.error && options.error.code === 'ECONNREFUSED') {
|
|
|
217
|
+ console.log('redis连接不成功');
|
|
|
218
|
+ }
|
|
|
219
|
+ if (options.total_retry_time > 1000 * 60 * 60 * 6) {
|
|
|
220
|
+ console.log('redis连接超时');
|
|
|
221
|
+ return;
|
|
|
222
|
+ }
|
|
|
223
|
+ if (options.attempt > 10) {
|
|
|
224
|
+ return 1000 * 60 * 60 * 0.5;
|
|
|
225
|
+ }
|
|
|
226
|
+ return Math.min(options.attempt * 100, 1000);
|
222
|
}
|
227
|
}
|
223
|
- return Math.min(options.attempt * 100, 1000);
|
228
|
+ },
|
|
|
229
|
+ session: {
|
|
|
230
|
+ host: 'redis.web.yohoops.org',
|
|
|
231
|
+ port: '6379',
|
|
|
232
|
+ pass: 'redis9646',
|
|
|
233
|
+ prefix: 'yohobuy_session:'
|
224
|
}
|
234
|
}
|
225
|
},
|
235
|
},
|
226
|
report: {
|
236
|
report: {
|
|
@@ -244,25 +254,6 @@ if (isProduction) { |
|
@@ -244,25 +254,6 @@ if (isProduction) { |
244
|
yohoNowApi: process.env.YOHO_NOW_API || 'http://yohonow-test.yohops.com:9999/',
|
254
|
yohoNowApi: process.env.YOHO_NOW_API || 'http://yohonow-test.yohops.com:9999/',
|
245
|
},
|
255
|
},
|
246
|
useOneapm: true,
|
256
|
useOneapm: true,
|
247
|
- useCache: true,
|
|
|
248
|
- redis: {
|
|
|
249
|
- connect: {
|
|
|
250
|
- host: '192.168.104.32',
|
|
|
251
|
- port: '6379',
|
|
|
252
|
- retry_strategy(options) {
|
|
|
253
|
- if (options.error && options.error.code === 'ECONNREFUSED') {
|
|
|
254
|
- // console.log('redis连接不成功');
|
|
|
255
|
- }
|
|
|
256
|
- if (options.total_retry_time > 1000 * 60 * 60 * 6) {
|
|
|
257
|
- // console.log('redis连接超时');
|
|
|
258
|
- return;
|
|
|
259
|
- }
|
|
|
260
|
- if (options.attempt > 10) {
|
|
|
261
|
- return 1000 * 60 * 60 * 0.5;
|
|
|
262
|
- }
|
|
|
263
|
- return Math.min(options.attempt * 100, 1000);
|
|
|
264
|
- }
|
|
|
265
|
- }
|
|
|
266
|
- }
|
257
|
+ useCache: true
|
267
|
});
|
258
|
});
|
268
|
} |
259
|
} |