예제 #1
0
파일: __init__.py 프로젝트: olabi/insights
def big_computation_visualizer_withfm():
    try:
        # returns instantly, does not perform computation if results are not
        # in cache
        result = use_fromcache(big_computation_withfm)()
    except MemoizeNotInCacheError:
        result = "The big computation has not been performed yet"
        # alternatively you can display a "please wait" message
        # and run  big_computation_withfm() without force_retrieve
    return "<html>%s</html>" % result
예제 #2
0
파일: __init__.py 프로젝트: olabi/insights
def big_computation_visualizer():
    return "<html>%s</html>" % use_fromcache(big_computation)()