MCPcopy Create free account
hub / github.com/Linen-dev/linen.dev / syncJob

Function syncJob

apps/web/services/accounts/sync.ts:152–181  ·  view source on GitHub ↗
({
  account_id,
  file_location,
  fullSync,
  logger,
}: SyncJobType & { logger: Logger })

Source from the content-addressed store, hash-verified

150}
151
152export async function syncJob({
153 account_id,
154 file_location,
155 fullSync,
156 logger,
157}: SyncJobType & { logger: Logger }) {
158 const accountId = account_id;
159 const fileLocation = file_location;
160
161 const account = await prisma.accounts.findUnique({
162 where: {
163 id: accountId,
164 },
165 include: {
166 discordAuthorizations: true,
167 slackAuthorizations: true,
168 },
169 });
170
171 const syncFunction = fileLocation
172 ? slackSyncWithFiles
173 : identifySyncType(account);
174
175 await syncFunction({
176 accountId,
177 fullSync,
178 fileLocation,
179 logger,
180 });
181}

Callers

nothing calls this directly

Calls 1

identifySyncTypeFunction · 0.85

Tested by

no test coverage detected