Skip to content

Commit

Permalink
notion: attempt relaunch workflows on connector update (#3550)
Browse files Browse the repository at this point in the history
  • Loading branch information
spolu authored Feb 2, 2024
1 parent ac08f9f commit 681d88c
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions connectors/src/connectors/notion/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,24 @@ export async function updateNotionConnector(
"Error deleting old Nango connection"
);
});

const dataSourceConfig = dataSourceConfigFromConnector(c);
try {
await launchNotionSyncWorkflow(c.id);
} catch (e) {
logger.error(
{
workspaceId: dataSourceConfig.workspaceId,
dataSourceName: dataSourceConfig.dataSourceName,
error: e,
},
"Error launching notion sync workflow post update."
);
return new Err({
type: "connector_update_error",
message: "Error restarting sync workflow after updating connector",
});
}
}

return new Ok(c.id.toString());
Expand Down

0 comments on commit 681d88c

Please sign in to comment.