cleanup and minor fixes...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2019-07-25 18:22:37 +03:00
parent 058e88aa57
commit 2cb9a0706e

View File

@ -458,24 +458,32 @@ var LifeCycleActions = actions.Actions({
// ready timeout -> force ready... // ready timeout -> force ready...
this.config['declare-ready-timeout'] > 0 this.config['declare-ready-timeout'] > 0
&& setTimeout(function(){ && !this.__ready_announce_timeout
// cleanup... && (this.__ready_announce_timeout =
if((that.__ready_announce_requests || new Set()).size == 0){ setTimeout(function(){
delete that.__ready_announce_requests // cleanup...
} delete this.__ready_announce_timeout
// force start... if((this.__ready_announce_requests || new Set()).size == 0){
if(!that.isReady()){ delete this.__ready_announce_requests
that.ready() }
// force start...
if(!this.isReady()){
// report...
this.logger
&& this.logger.push('start')
.emit('forcing ready.')
.emit('stalled:',
this.__ready_announce_requested,
...(this.__ready_announce_requests || []))
// report... // force ready...
that.logger this.__ready = !!this.ready()
&& that.logger.psuh('start')
.emit('forced ready.') // cleanup...
.emit('stalled:', delete this.__ready_announce_requested
this.__ready_announce_requested, delete this.__ready_announce_requests
...[this.__ready_announce_requests || []]) }
} }.bind(this), this.config['declare-ready-timeout']))
}, this.config['declare-ready-timeout'])
// trigger the started event... // trigger the started event...
this.started() this.started()