@gesdisc/mongo-stream
Advanced tools
Comparing version 0.1.6 to 0.1.7
@@ -36,3 +36,3 @@ { | ||
}, | ||
"logLevel": "debug" | ||
"logLevel": "info" | ||
} |
@@ -145,13 +145,4 @@ const logger = new (require('service-logger'))(__filename); | ||
this.changeStream.on('error', (error) => { | ||
logger.error(`${this.collectionName} changeStream error:`, error); | ||
// 40585: resume of change stream was not possible, as the resume token was not found | ||
// 40615: The resume token UUID does not exist. Has the collection been dropped? | ||
// 260: InvalidResumeToken. Attempted to resume a stream on a collection which has been dropped. | ||
// https://github.com/mongodb/mongo/blob/master/src/mongo/base/error_codes.err | ||
if (error.code === 40585 || error.code === 40615 || error.code === 260) { | ||
this.resetChangeStream({ignoreResumeToken: true}); | ||
} | ||
else { | ||
this.resetChangeStream({ignoreResumeToken: false}); | ||
} | ||
logger.debug(`${this.collectionName} changeStream error:`, error); | ||
this.resetChangeStream({ ignoreResumeToken: true }); | ||
}); | ||
@@ -158,0 +149,0 @@ } |
{ | ||
"name": "@gesdisc/mongo-stream", | ||
"version": "0.1.6", | ||
"version": "0.1.7", | ||
"description": "Sync data from Mongodb to Elasticsearch", | ||
@@ -5,0 +5,0 @@ "main": "server.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
893039
24
923