@defer.deferredGenerator
    def restart(self):
        result = None
        try:
            if self.running:
                d = self.stop()
                wfd = defer.waitForDeferred(d)
                yield wfd
                wfd.getResult()
            d = self.start()
            wfd = defer.waitForDeferred(d)
            yield wfd
            result = wfd.getResult()
        except:
            result = Failure()
            log('Unhandled exception\n' + result.getTraceback())
        yield result

    ###########################################################################
    # getting and setting of attr's ``pid``, ``inode``, ``version``, and 
    # ``appversion`` are done below here.
    ###########################################################################
convenient restart method for an Application Instance
dataset/ETHPy150Open OrbitzWorldwide/droned/droned/lib/droned/models/app.py/AppInstance.restart