Skip to content

Commit 23a44de

Browse files
waleedlatif1claude
andcommitted
fix(kb): remove dead interval branch when re-enabling connector
When `updates.nextSyncAt === undefined`, syncIntervalMinutes was not in the request, so `parsed.data.syncIntervalMinutes` is always undefined. Simplify to just schedule an immediate sync — the sync engine sets the proper nextSyncAt based on the connector's DB interval after completion. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent c3ea8e1 commit 23a44de

File tree

1 file changed

+1
-6
lines changed
  • apps/sim/app/api/knowledge/[id]/connectors/[connectorId]

1 file changed

+1
-6
lines changed

apps/sim/app/api/knowledge/[id]/connectors/[connectorId]/route.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -226,12 +226,7 @@ export async function PATCH(request: NextRequest, { params }: RouteParams) {
226226
updates.consecutiveFailures = 0
227227
updates.lastSyncError = null
228228
if (updates.nextSyncAt === undefined) {
229-
const interval = parsed.data.syncIntervalMinutes
230-
if (interval && interval > 0) {
231-
updates.nextSyncAt = new Date(Date.now() + interval * 60 * 1000)
232-
} else {
233-
updates.nextSyncAt = new Date()
234-
}
229+
updates.nextSyncAt = new Date()
235230
}
236231
}
237232
}

0 commit comments

Comments
 (0)