@@ -129,46 +129,46 @@ exports.initialize_mongodb = function (next, server) {
129129 // Initiate a watch on the attachment path
130130 _checkAttachmentPaths ( plugin ) ;
131131 // Create Indexes
132- server . notes . mongodb . collection ( plugin . cfg . collections . queue ) . createIndex ( [
133- {
134- 'key' : { 'received_date' : 1 } ,
135- 'background' : true
136- } ,
137- {
138- 'key' : { 'received_date' : - 1 } ,
139- 'background' : true
140- } ,
141- {
142- 'key' : { 'message_id' : 1 } ,
143- 'background' : true
144- } ,
145- {
146- 'key' : { 'transferred' : 1 , 'status' : 1 , 'received_date' : 1 } ,
147- 'background' : true
148- } ,
149- {
150- 'key' : { 'transferred' : 1 , 'status' : 1 , 'timestamp' : 1 } ,
151- 'background' : true
152- } ,
153- {
154- 'key' : { 'transferred' : 1 , 'status' : 1 , 'processed' : 1 , 'timestamp' : 1 } ,
155- 'background' : true
156- } ,
157- ] ) ;
132+ // server.notes.mongodb.collection(plugin.cfg.collections.queue).createIndex([
133+ // {
134+ // 'key' : { 'received_date' : 1 },
135+ // 'background' : true
136+ // },
137+ // {
138+ // 'key' : { 'received_date' : -1 },
139+ // 'background' : true
140+ // },
141+ // {
142+ // 'key' : { 'message_id' : 1 },
143+ // 'background' : true
144+ // },
145+ // {
146+ // 'key' : { 'transferred' : 1, 'status' : 1, 'received_date' : 1 },
147+ // 'background' : true
148+ // },
149+ // {
150+ // 'key' : { 'transferred' : 1, 'status' : 1, 'timestamp' : 1 },
151+ // 'background' : true
152+ // },
153+ // {
154+ // 'key' : { 'transferred' : 1, 'status' : 1, 'processed' : 1, 'timestamp' : 1 },
155+ // 'background' : true
156+ // },
157+ // ]);
158158 // Limits
159- if ( plugin . cfg . limits . incoming === 'yes' && plugin . cfg . limits . db === 'mongodb' ) {
160- server . notes . mongodb . collection ( plugin . cfg . limits . incoming_collection ) . createIndex ( [
161- {
162- 'key' : { 'from' : 1 , 'to' : 1 } ,
163- 'background' : true
164- } ,
165- {
166- 'key' : { 'timestamp' : 1 } ,
167- 'background' : true ,
168- 'expireAfterSeconds' : parseInt ( plugin . cfg . limits . incoming_seconds )
169- }
170- ] ) ;
171- }
159+ // if ( plugin.cfg.limits.incoming === 'yes' && plugin.cfg.limits.db === 'mongodb' ) {
160+ // server.notes.mongodb.collection(plugin.cfg.limits.incoming_collection).createIndex([
161+ // {
162+ // 'key' : { 'from' : 1, 'to' : 1 },
163+ // 'background' : true
164+ // },
165+ // {
166+ // 'key' : { 'timestamp' : 1 },
167+ // 'background' : true,
168+ // 'expireAfterSeconds' : parseInt(plugin.cfg.limits.incoming_seconds)
169+ // }
170+ // ]);
171+ // }
172172 next ( ) ;
173173 } ) ;
174174 }
0 commit comments