@@ -9,7 +9,7 @@ export class InvalidConfiguration extends Error {
99 }
1010}
1111
12- export function convertTimeStrToMs (
12+ export function convertTimeStrToSeconds (
1313 input : string ,
1414 envName : string ,
1515 description : string = 'Must be a number in seconds or duration string (1s, 1m, 1h).' ,
@@ -126,7 +126,7 @@ function asBoolOrTime(input: string, envName: string): number | boolean {
126126 return false ;
127127 }
128128
129- return convertTimeStrToMs (
129+ return convertTimeStrToSeconds (
130130 input ,
131131 envName ,
132132 'Should be boolean or number (in seconds) or string in time format (1s, 1m, 1h)'
@@ -510,7 +510,7 @@ const variables: Record<string, (...args: any) => any> = {
510510 } ) => {
511511 const key = keyByDataSource ( 'CUBEJS_DB_POLL_MAX_INTERVAL' , dataSource ) ;
512512 const value = process . env [ key ] || '5s' ;
513- return convertTimeStrToMs ( value , key ) ;
513+ return convertTimeStrToSeconds ( value , key ) ;
514514 } ,
515515
516516 /**
@@ -525,7 +525,7 @@ const variables: Record<string, (...args: any) => any> = {
525525 const key = keyByDataSource ( 'CUBEJS_DB_POLL_TIMEOUT' , dataSource ) ;
526526 const value = process . env [ key ] ;
527527 if ( value ) {
528- return convertTimeStrToMs ( value , key ) ;
528+ return convertTimeStrToSeconds ( value , key ) ;
529529 } else {
530530 return null ;
531531 }
@@ -546,7 +546,7 @@ const variables: Record<string, (...args: any) => any> = {
546546 } = { } ) => {
547547 const key = keyByDataSource ( 'CUBEJS_DB_QUERY_TIMEOUT' , dataSource ) ;
548548 const value = process . env [ key ] || '10m' ;
549- return convertTimeStrToMs ( value , key ) ;
549+ return convertTimeStrToSeconds ( value , key ) ;
550550 } ,
551551
552552 /**
0 commit comments