File tree 2 files changed +27
-5
lines changed
2 files changed +27
-5
lines changed Original file line number Diff line number Diff line change @@ -45,13 +45,32 @@ var settings = require('./models/settings.json');
45
45
var connectStr = process . env . CONNECT_STRING || settings . connect ;
46
46
var sessionSecret = process . env . SESSION_SECRET || settings . secret ;
47
47
var db = mongoose . connection ;
48
+
48
49
var dbOptions = {
49
50
server : {
51
+ poolSize : 5 ,
50
52
socketOptions : {
51
- keepAlive : 1
53
+ autoReconnect : false ,
54
+ noDelay : true ,
55
+ keepAlive : 1 ,
56
+ connectTimeoutMS : 0 ,
57
+ socketTimeoutMS : 0
52
58
} ,
53
- reconnectTries : 60 ,
54
- reconnectInterval : 4000
59
+ reconnectTries : 30 ,
60
+ reconnectInterval : 1000
61
+ }
62
+ } ;
63
+
64
+ if ( isPro ) {
65
+ dbOptions . replset = {
66
+ secondaryAcceptableLatencyMS : 15 ,
67
+ poolSize : 5 ,
68
+ socketOptions : {
69
+ noDelay : true ,
70
+ keepAlive : 0 ,
71
+ connectTimeoutMS : 0 ,
72
+ socketTimeoutMS : 0
73
+ }
55
74
}
56
75
} ;
57
76
Original file line number Diff line number Diff line change @@ -174,13 +174,16 @@ exports.getSource = function (aReq, aCallback) {
174
174
175
175
if ( ! aScript ) {
176
176
aCallback ( null ) ;
177
- console . warn ( 'no script found' ) ;
177
+ if ( isDbg ) {
178
+ console . warn ( 'no script found yet' ) ;
179
+ }
178
180
return ;
179
181
}
180
182
181
183
s3Object = s3 . getObject ( { Bucket : bucketName , Key : installNameBase + ( isLib ? '.js' : '.user.js' ) } ) . createReadStream ( ) .
182
184
on ( 'error' , function ( ) {
183
- if ( isPro ) {
185
+ // TODO: #486
186
+ if ( isDbg ) {
184
187
console . error ( 'S3 Key Not Found ' + installNameBase + ( isLib ? '.js' : '.user.js' ) ) ;
185
188
}
186
189
You can’t perform that action at this time.
0 commit comments