Comparing version 1.6.17 to 1.6.18
@@ -40,3 +40,4 @@ 'use strict'; | ||
queueTimeout: 1000, | ||
queueTimeoutMaxLoops: 3 | ||
queueTimeoutMaxLoops: 3//, | ||
// startRevisionNumber: 1 | ||
}; | ||
@@ -43,0 +44,0 @@ |
@@ -22,3 +22,4 @@ 'use strict'; | ||
queueTimeout: 1000, | ||
queueTimeoutMaxLoops: 3 | ||
queueTimeoutMaxLoops: 3//, | ||
// startRevisionNumber: 1 | ||
}; | ||
@@ -170,3 +171,3 @@ | ||
context: !!self.definition.context ? dotty.get(evt, self.definition.context) : undefined, | ||
guardRevision: revInStore | ||
guardRevision: revInStore || self.options.startRevisionNumber | ||
}; | ||
@@ -253,3 +254,3 @@ self.onEventMissingHandle(info, evt); | ||
function proceed (revInStore) { | ||
if (!revInStore && !self.currentHandlingRevisions[concatenatedId]) { | ||
if (!revInStore && !self.currentHandlingRevisions[concatenatedId] && (self.options.startRevisionNumber === undefined || self.options.startRevisionNumber === null)) { | ||
self.currentHandlingRevisions[concatenatedId] = revInEvt; | ||
@@ -277,2 +278,8 @@ debug('first revision to store [concatenatedId]=' + concatenatedId + ', [revInStore]=' + (revInStore || 'null') + ', [revInEvt]=' + revInEvt); | ||
if (!revInStore && self.options.startRevisionNumber >= 0 && revInEvt > self.options.startRevisionNumber) { | ||
debug('queue event (startRevisionNumber is set) [concatenatedId]=' + concatenatedId + ', [startRevisionNumber]=' + self.options.startRevisionNumber + ', [revInEvt]=' + revInEvt); | ||
self.queueEvent(evt, callback); | ||
return; | ||
} | ||
if (!revInStore && revInEvt > self.currentHandlingRevisions[concatenatedId]) { | ||
@@ -279,0 +286,0 @@ debug('queue event [concatenatedId]=' + concatenatedId + ', [currentlyHandling]=' + self.currentHandlingRevisions[concatenatedId] + ', [revInEvt]=' + revInEvt); |
{ | ||
"author": "adrai", | ||
"name": "cqrs-saga", | ||
"version": "1.6.17", | ||
"version": "1.6.18", | ||
"private": false, | ||
@@ -6,0 +6,0 @@ "main": "index.js", |
@@ -0,1 +1,4 @@ | ||
## [v1.6.18](https://github.com/adrai/node-cqrs-saga/compare/v1.6.17...v1.6.18) | ||
- revisionGuard: optional startRevisionNumber | ||
## [v1.6.17](https://github.com/adrai/node-cqrs-saga/compare/v1.6.16...v1.6.17) | ||
@@ -2,0 +5,0 @@ - redis: added optional heartbeat |
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
165924
4488