File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -130,14 +130,13 @@ export class DefaultEventQueue implements IEventQueue {
130130 public suspendProcessing ( durationInMinutes ?: number , discardFutureQueuedItems ?: boolean , clearQueue ?: boolean ) : void {
131131 const config : Configuration = this . config ; // Optimization for minifier.
132132
133+ const currentDate = new Date ( ) ;
133134 if ( ! durationInMinutes || durationInMinutes <= 0 ) {
134- durationInMinutes = 5 ;
135+ durationInMinutes = Math . ceil ( currentDate . getMinutes ( ) / 15 ) * 15 - currentDate . getMinutes ( ) ;
135136 }
136137
137138 config . services . log . info ( `Suspending processing for ${ durationInMinutes } minutes.` ) ;
138- this . _suspendProcessingUntil = new Date (
139- new Date ( ) . getTime ( ) + ( durationInMinutes * 60000 ) ,
140- ) ;
139+ this . _suspendProcessingUntil = new Date ( currentDate . getTime ( ) + ( durationInMinutes * 60000 ) ) ;
141140
142141 if ( discardFutureQueuedItems ) {
143142 this . _discardQueuedItemsUntil = this . _suspendProcessingUntil ;
You can’t perform that action at this time.
0 commit comments