def touch_project ( ) : r = Response ( ) project = cd . project . get_internal_project ( ) if project : project . refresh ( ) else : r . fail ( code = 'NO_PROJECT' , message = 'No open project to refresh' ) return r . update ( sync_time = sync_status . get ( 'time' , 0 ) ) . flask_serialize ( )
python flask auto refresh
Touches the project to trigger refreshing its cauldron . json state .
def touch_project():
    """
    Touches the project to trigger refreshing its cauldron.json state.
    """
    r = Response()
    project = cd.project.get_internal_project()

    if project:
        project.refresh()
    else:
        r.fail(
            code='NO_PROJECT',
            message='No open project to refresh'
        )

    return r.update(
        sync_time=sync_status.get('time', 0)
    ).flask_serialize()