There are two options. First is HTML refresh: <meta http-equiv="refresh" content="5" /> which will request your page every 5s and then you show either "please wait" message or the results of the background processing if it's finished.
Second is Javascript + AJAX asynchronous poll, see the examples in the web2py book: http://web2py.com/book/default/chapter/10#The-ajax-Function or this slice: http://www.web2pyslices.com/main/slices/take_slice/51

