core/execute.js
function (id) {
		
		LOG.warn('server started: ' + server_type, l_name);
    
		// check if we should notify start server request
		for (var i=0; i < l_pendingStart.length; i++) {
		
			var task = l_pendingStart[i];
		
			if (task.server_type !== server_type) {
				continue;
			}

			LOG.warn('pending type matched: ' + task.server_type, l_name);

			// record server id, check for return
			task.servers.push(id);
			task.curr++;
			
			// store this process id
			if (l_started.hasOwnProperty(server_type) === false)
				l_started[server_type] = [];
			
			// NOTE: we currently do not maintain this id, should we?
			l_started[server_type].push(id);
			
			// check if all servers of a particular type are started
			if (task.curr === task.total) {
				UTIL.safeCall(task.onDone, null, task.servers);
				
				// remove this item until app servers have also reported back
				l_pendingStart.splice(i, 1);
			}
			break;
		}

		// delete log
		l_deleteStartedServer({
			owner: args.owner,
			project: args.project,
			name: args.name
		});

		// log started server
		l_getServerInfo({
			owner: args.owner,
			project: args.project,
			name: args.name,
			size: args.size
		}, 1);
	}
function (id) {
		
		LOG.warn('server started: ' + server_type, l_name);
    
		// check if we should notify start server request
		for (var i=0; i < l_pendingStart.length; i++) {
		
			var task = l_pendingStart[i];
		
			if (task.server_type !== server_type) {
				continue;
			}

			LOG.warn('pending type matched: ' + task.server_type, l_name);

			// record server id, check for return
			task.servers.push(id);
			task.curr++;
			
			// store this process id
			if (l_started.hasOwnProperty(server_type) === false)
				l_started[server_type] = [];
			
			// NOTE: we currently do not maintain this id, should we?
			l_started[server_type].push(id);
			
			// check if all servers of a particular type are started
			if (task.curr === task.total) {
				UTIL.safeCall(task.onDone, null, task.servers);
				
				// remove this item until app servers have also reported back
				l_pendingStart.splice(i, 1);
			}
			break;
		}

		// delete log
		l_deleteStartedServer({
			owner: args.owner,
			project: args.project,
			name: args.name
		});

		// log started server
		l_getServerInfo({
			owner: args.owner,
			project: args.project,
			name: args.name,
			size: args.size
		}, 1);
	}
function ( id ) { LOG . warn ( 'server started: ' + server_type , l_name ) ; // check if we should notify start server request for ( var i = 0 ; i < l_pendingStart . length ; i ++ ) { var task = l_pendingStart [ i ] ; if ( task . server_type !== server_type ) { continue ; } LOG . warn ( 'pending type matched: ' + task . server_type , l_name ) ; // record server id, check for return task . servers . push ( id ) ; task . curr ++ ; // store this process id if ( l_started . hasOwnProperty ( server_type ) === false ) l_started [ server_type ] = [ ] ; // NOTE: we currently do not maintain this id, should we? l_started [ server_type ] . push ( id ) ; // check if all servers of a particular type are started if ( task . curr === task . total ) { UTIL . safeCall ( task . onDone , null , task . servers ) ; // remove this item until app servers have also reported back l_pendingStart . splice ( i , 1 ) ; } break ; } // delete log l_deleteStartedServer ( { owner : args . owner , project : args . project , name : args . name } ) ; // log started server l_getServerInfo ( { owner : args . owner , project : args . project , name : args . name , size : args . size } , 1 ) ; }
notify if a server process has started
notify if a server process has started