Closed tahpot closed 3 weeks ago
I have created a new method of syncing data that is more flexible and ensures that new items are fetched before older items are backfilled.
It users a helper library called ItemsRangeTracker. It's designed to load and save the current position information in syncPosition.thisRef.
syncPosition.thisRef
I have updated the gmail handler to use this impementation, you can see the diff here.
The flow is like this:
You'll notice this has simplified the code and there is no longer setNextPosition() or stopSync() methods.
setNextPosition()
stopSync()
Also see how the unit tests have been updated: https://github.com/verida/data-connector-server/pull/91/files#diff-3878c5244bf405ac39a2ccd4cc0c0df958f2fc5481a71c76a40d9042a658e7da
I have created a new method of syncing data that is more flexible and ensures that new items are fetched before older items are backfilled.
It users a helper library called ItemsRangeTracker. It's designed to load and save the current position information in
syncPosition.thisRef
.I have updated the gmail handler to use this impementation, you can see the diff here.
The flow is like this:
You'll notice this has simplified the code and there is no longer
setNextPosition()
orstopSync()
methods.Also see how the unit tests have been updated: https://github.com/verida/data-connector-server/pull/91/files#diff-3878c5244bf405ac39a2ccd4cc0c0df958f2fc5481a71c76a40d9042a658e7da