File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
packages/cubejs-firebolt-driver/src Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -77,7 +77,8 @@ export class FireboltDriver extends BaseDriver implements DriverInterface {
7777 testConnectionTimeout ?: number ,
7878 } = { } ,
7979 ) {
80- super ( config ) ;
80+ // Set connection timeout to 2 minutes to allow the engine to start if it's stopped
81+ super ( { testConnectionTimeout : 120000 , ...config } ) ;
8182
8283 const dataSource =
8384 config . dataSource ||
@@ -122,6 +123,7 @@ export class FireboltDriver extends BaseDriver implements DriverInterface {
122123 private async initConnection ( ) {
123124 try {
124125 const connection = await this . firebolt . connect ( this . config . connection ) ;
126+ await this . ensureEngineRunning ( ) ;
125127 return connection ;
126128 } catch ( e ) {
127129 this . connection = null ;
@@ -174,7 +176,7 @@ export class FireboltDriver extends BaseDriver implements DriverInterface {
174176 await connection . testConnection ( ) ;
175177 } catch ( error ) {
176178 console . log ( error ) ;
177- throw new Error ( 'Unable to connect' ) ;
179+ throw error ;
178180 }
179181 }
180182
You can’t perform that action at this time.
0 commit comments