def stop_app(app_id, is_finished=False):
    """
    update app state to 'Stopped'
    """
    state = constant.STATE_APP_STOPPED if is_finished else constant.STATE_APP_STOPPING
    app_update_state(app_id, state)
def stop_app ( app_id , is_finished = False ) : state = constant . STATE_APP_STOPPED if is_finished else constant . STATE_APP_STOPPING app_update_state ( app_id , state )
update app state to 'Stopped'