File tree Expand file tree Collapse file tree 3 files changed +7
-4
lines changed
cubejs-query-orchestrator/orchestrator Expand file tree Collapse file tree 3 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -90,7 +90,9 @@ class QueryOrchestrator {
90
90
}
91
91
92
92
async cleanup ( ) {
93
- await this . redisPool . cleanup ( ) ;
93
+ if ( this . redisPool ) {
94
+ await this . redisPool . cleanup ( ) ;
95
+ }
94
96
}
95
97
}
96
98
Original file line number Diff line number Diff line change @@ -89,7 +89,8 @@ class OrchestratorApi {
89
89
release ( ) {
90
90
return Promise . all ( [
91
91
this . releaseDriver ( this . driverFactory ) ,
92
- this . releaseDriver ( this . externalDriverFactory )
92
+ this . releaseDriver ( this . externalDriverFactory ) ,
93
+ this . orchestrator . cleanup ( )
93
94
] ) ;
94
95
}
95
96
Original file line number Diff line number Diff line change @@ -422,7 +422,7 @@ class CubejsServerCore {
422
422
}
423
423
return driverPromise ;
424
424
} ,
425
- getExternalDriverFactory : async ( ) => {
425
+ getExternalDriverFactory : this . externalDriverFactory && ( async ( ) => {
426
426
if ( ! externalPreAggregationsDriverPromise ) {
427
427
const driver = await this . externalDriverFactory ( context ) ;
428
428
externalPreAggregationsDriverPromise = driver . testConnection ( ) . then ( ( ) => driver ) . catch ( e => {
@@ -431,7 +431,7 @@ class CubejsServerCore {
431
431
} ) ;
432
432
}
433
433
return externalPreAggregationsDriverPromise ;
434
- } ,
434
+ } ) ,
435
435
redisPrefix : dataSourceId ,
436
436
orchestratorOptions : this . orchestratorOptions ( context )
437
437
} ) ;
You can’t perform that action at this time.
0 commit comments