MCPcopy Index your code
hub / github.com/Linen-dev/linen.dev / sync

Function sync

packages/typesense/src/sync.ts:15–32  ·  view source on GitHub ↗
({
  accountId,
  logger,
}: {
  accountId: string;
  logger: Logger;
})

Source from the content-addressed store, hash-verified

13import { accounts, prisma } from '@linen/database';
14
15export async function sync({
16 accountId,
17 logger,
18}: {
19 accountId: string;
20 logger: Logger;
21}) {
22 const accountSettings = await getAccountSettings(accountId, logger);
23 if (!accountSettings) return;
24 await syncUpdatedThreads(
25 accountSettings.searchSettings,
26 accountSettings.account,
27 logger
28 );
29
30 // set cursor for next sync job
31 await persistEndFlag(accountSettings.searchSettings, accountId);
32}
33
34async function syncUpdatedThreads(
35 searchSettings: SerializedSearchSettings,

Callers 1

syncAllFunction · 0.90

Calls 3

getAccountSettingsFunction · 0.90
persistEndFlagFunction · 0.90
syncUpdatedThreadsFunction · 0.85

Tested by

no test coverage detected