Skip to content

Commit 104a862

Browse files
authored
ENG-1004 add a buffer, so we do not miss any change (#518)
1 parent 7fab503 commit 104a862

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

apps/roam/src/utils/syncDgNodesToSupabase.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,8 @@ export const createOrUpdateDiscourseEmbedding = async (showToast = false) => {
422422
}
423423
claimed = true;
424424
const allUsers = await getAllUsers();
425-
const time = (lastUpdateTime || DEFAULT_TIME).toISOString();
425+
const sinceTime = (lastUpdateTime || DEFAULT_TIME).valueOf() - 1000; // add a one-second buffer
426+
const time = new Date(sinceTime).toISOString();
426427
const { allDgNodeTypes, dgNodeTypesWithSettings } = getDgNodeTypes();
427428

428429
const allNodeInstances = await getAllDiscourseNodesSince(

0 commit comments

Comments
 (0)