File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
packages/cubejs-server-core/src/core Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -691,14 +691,15 @@ export class CubejsServerCore {
691691 * @internal Please dont use this method directly, use refreshTimer
692692 */
693693 public handleScheduledRefreshInterval = async ( options ) => {
694- const contexts = ( await this . options . scheduledRefreshContexts ( ) ) . filter (
695- ( context ) => this . contextAcceptor . shouldAccept ( this . migrateBackgroundContext ( context ) ) . accepted
696- ) ;
697- if ( contexts . length < 1 ) {
694+ const allContexts = await this . options . scheduledRefreshContexts ( ) ;
695+ if ( allContexts . length < 1 ) {
698696 this . logger ( 'Refresh Scheduler Error' , {
699697 error : 'At least one context should be returned by scheduledRefreshContexts'
700698 } ) ;
701699 }
700+ const contexts = allContexts . filter (
701+ ( context ) => this . contextAcceptor . shouldAccept ( this . migrateBackgroundContext ( context ) ) . accepted
702+ ) ;
702703
703704 const batchLimit = pLimit ( this . options . scheduledRefreshBatchSize ) ;
704705 return Promise . all (
You can’t perform that action at this time.
0 commit comments