model/persistence.js
function(message) {
        this._resetRestartTimeout(this.get('heartbeatTimeout'));
        if (!this._lastHeart) {
            this._isStartingUp = false;
            this._firstHeart = Date.now();
            logger.info('App started.');

            if (this.get('postLaunchCommand')) {
                spawn(this.get('postLaunchCommand'), null, null, function(err, output) {
                    console.log(err, output);
                });
            }

            if (this._startupCallback) {
                this._startupCallback();
                this._startupCallback = null;
            }
        }

        this._lastHeart = Date.now();
        this.trigger('heart');
    }
function(message) {
        this._resetRestartTimeout(this.get('heartbeatTimeout'));
        if (!this._lastHeart) {
            this._isStartingUp = false;
            this._firstHeart = Date.now();
            logger.info('App started.');

            if (this.get('postLaunchCommand')) {
                spawn(this.get('postLaunchCommand'), null, null, function(err, output) {
                    console.log(err, output);
                });
            }

            if (this._startupCallback) {
                this._startupCallback();
                this._startupCallback = null;
            }
        }

        this._lastHeart = Date.now();
        this.trigger('heart');
    }
function ( message ) { this . _resetRestartTimeout ( this . get ( 'heartbeatTimeout' ) ) ; if ( ! this . _lastHeart ) { this . _isStartingUp = false ; this . _firstHeart = Date . now ( ) ; logger . info ( 'App started.' ) ; if ( this . get ( 'postLaunchCommand' ) ) { spawn ( this . get ( 'postLaunchCommand' ) , null , null , function ( err , output ) { console . log ( err , output ) ; } ) ; } if ( this . _startupCallback ) { this . _startupCallback ( ) ; this . _startupCallback = null ; } } this . _lastHeart = Date . now ( ) ; this . trigger ( 'heart' ) ; }
Handle heartbeat messages from the app.
Handle heartbeat messages from the app .