File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
src/platform/notebooks/deepnote Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -92,16 +92,17 @@ export class SqlIntegrationEnvironmentVariablesProvider {
9292 /**
9393 * Get environment variables for SQL integrations used in the given notebook.
9494 */
95- public async getEnvironmentVariables (
96- resource : Resource ,
97- _token ?: CancellationToken
98- ) : Promise < EnvironmentVariables > {
95+ public async getEnvironmentVariables ( resource : Resource , token ?: CancellationToken ) : Promise < EnvironmentVariables > {
9996 const envVars : EnvironmentVariables = { } ;
10097
10198 if ( ! resource ) {
10299 return envVars ;
103100 }
104101
102+ if ( token ?. isCancellationRequested ) {
103+ return envVars ;
104+ }
105+
105106 logger . info ( `SqlIntegrationEnvironmentVariablesProvider: Getting env vars for resource ${ resource . toString ( ) } ` ) ;
106107 logger . info (
107108 `SqlIntegrationEnvironmentVariablesProvider: Available notebooks: ${ workspace . notebookDocuments
@@ -133,6 +134,10 @@ export class SqlIntegrationEnvironmentVariablesProvider {
133134
134135 // Get credentials for each integration and add to environment variables
135136 for ( const integrationId of integrationIds ) {
137+ if ( token ?. isCancellationRequested ) {
138+ break ;
139+ }
140+
136141 try {
137142 const config = await this . integrationStorage . get ( integrationId ) ;
138143 if ( ! config ) {
You can’t perform that action at this time.
0 commit comments