utils.py 文件源码

python
阅读 30 收藏 0 点赞 0 评论 0

项目:simple-ostinato 作者: little-dude 项目源码 文件源码
def kill_drone():
    global DRONE_RUNNING
    LOG.info('stopping drone')
    if DRONE_RUNNING is False:
        LOG.warning('drone is not running, nothing to do')
        return
    LOG.info('trying to stop drone gracefully')
    DRONE.terminate()
    try:
        DRONE.wait(timeout=10)
        LOG.info('drone exited gracefully')
    except subprocess.TimeoutExpired:
        LOG.info('could not terminate drone properly, kill it.')
        DRONE.kill()
        DRONE.wait(timeout=10)
        LOG.info('drone has been killed')
    DRONE_RUNNING = False
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号