Skip to content

Commit

Permalink
stop connectors
Browse files Browse the repository at this point in the history
  • Loading branch information
Henry Fontanier committed Apr 4, 2024
1 parent f02b1cc commit de900bd
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions front/scrub_workspace/temporal/activities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,12 @@ export async function stopAllConnectors({
}) {
const auth = await Authenticator.internalAdminForWorkspace(workspaceId);
const dataSources = await getDataSources(auth);
const connectedDataSources = dataSources.filter((ds) => !!ds.connectorId);
const connectorsApi = new ConnectorsAPI(logger);
for (const ds of connectedDataSources) {
void connectorsApi;
void ds;
for (const ds of dataSources) {
if (!ds.connectorId) {
continue;
}
await connectorsApi.stopConnector(ds.connectorId);
}
}

Expand Down

0 comments on commit de900bd

Please sign in to comment.