Improve initial sync subscription

This commit is contained in:
Gregory Schier
2025-01-11 06:47:03 -08:00
parent bcf5b3db84
commit 576340db33
2 changed files with 40 additions and 22 deletions

View File

@@ -53,10 +53,10 @@ export const syncWorkspace = createFastMutation<
mutationFn: async ({ workspaceId, syncDir }) => {
const ops = (await calculateSync(workspaceId, syncDir)) ?? [];
if (ops.length === 0) {
console.log('Nothing to sync', workspaceId, syncDir, ops);
console.log('Nothing to sync', workspaceId, syncDir);
return;
}
console.log('syncing workspace', workspaceId, syncDir, ops);
console.log('Syncing workspace', workspaceId, syncDir, ops);
const dbOps = ops.filter((o) => o.type.startsWith('db'));