Skip to content

Commit

Permalink
throw error if there are no new records since last upload for tandem
Browse files Browse the repository at this point in the history
  • Loading branch information
gniezen committed Nov 12, 2019
1 parent 8e643b3 commit 55d2a68
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/drivers/tandem/tandemDriver.js
Original file line number Diff line number Diff line change
Expand Up @@ -1366,6 +1366,10 @@ module.exports = function (config) {

data.end_seq = result.payload['end_seq'];

if (lastEndPosition === data.end_seq) {
return callback(new Error('No new records since last upload.'));
}

if ((lastEndPosition != null) &&
(lastEndPosition < data.end_seq) &&
(uploadDataPeriod.periodGlobal === uploadDataPeriod.PERIODS.DELTA)) {
Expand Down

0 comments on commit 55d2a68

Please sign in to comment.