lib/ishiki.js
function switchState(started, pkg) {
    pkg.started = started;

    //add available port back into port range
    if (!started && pkg.env && pkg.env.PORT)
      ports.push(pkg.env.PORT);

    console.log((started ? 'Started' : 'Stopped') + ' application ' + pkg.user + '/' + pkg.name);

    logInfo('info', 'Application ' + (started ? 'started' : 'stopped'), {name: pkg.app, user: pkg.user});
    droneModel.createOrUpdate(pkg, function(){});
  }
function switchState(started, pkg) {
    pkg.started = started;

    //add available port back into port range
    if (!started && pkg.env && pkg.env.PORT)
      ports.push(pkg.env.PORT);

    console.log((started ? 'Started' : 'Stopped') + ' application ' + pkg.user + '/' + pkg.name);

    logInfo('info', 'Application ' + (started ? 'started' : 'stopped'), {name: pkg.app, user: pkg.user});
    droneModel.createOrUpdate(pkg, function(){});
  }
function switchState ( started , pkg ) { pkg . started = started ; //add available port back into port range if ( ! started && pkg . env && pkg . env . PORT ) ports . push ( pkg . env . PORT ) ; console . log ( ( started ? 'Started' : 'Stopped' ) + ' application ' + pkg . user + '/' + pkg . name ) ; logInfo ( 'info' , 'Application ' + ( started ? 'started' : 'stopped' ) , { name : pkg . app , user : pkg . user } ) ; droneModel . createOrUpdate ( pkg , function ( ) { } ) ; }
update drone state
update drone state