File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2030,6 +2030,10 @@ export class DatabaseConnection {
20302030 throw new Error ( "DeleteMany needs either a list of ids or a query" ) ;
20312031 }
20322032
2033+ const _skip_array : string [ ] = Config . skip_history_collections . split ( "," ) ;
2034+ const skip_array : string [ ] = [ ] ;
2035+ _skip_array . forEach ( x => skip_array . push ( x . trim ( ) ) ) ;
2036+
20332037 if ( collectionname === "files" ) { collectionname = "fs.files" ; }
20342038 if ( collectionname === "fs.files" ) {
20352039 const ot_end = Logger . otel . startTimer ( ) ;
@@ -2083,7 +2087,9 @@ export class DatabaseConnection {
20832087 _version : doc . _version ,
20842088 reason : doc . reason
20852089 }
2086- bulkInsert . insert ( fullhist ) ;
2090+ if ( skip_array . indexOf ( collectionname ) == - 1 ) {
2091+ if ( ! collectionname . endsWith ( "_hist" ) ) bulkInsert . insert ( fullhist ) ;
2092+ }
20872093 // bulkRemove.find({ _id: doc._id }).removeOne();
20882094 bulkRemove . find ( { _id : doc . _id } ) . deleteOne ( ) ;
20892095 counter ++
You can’t perform that action at this time.
0 commit comments