A new little mini-middleware: http://pythonpaste.org/waitforit/
From the page: What It Does Wait For It gives users a timely response even when the underlying WSGI application isn't very timely. Wait For It does this by launching an extra thread for each incoming request. If the wrapped application responds in a timely manner (before time_limit) the response is simply passed on. If the response doesn't come back before the time limit, the user is given a response page that asks them to wait. The response page contains Javascript that will re-check the status of the page, and when the page is ready it will reload the page. Applications can provide feedback to users by looking for environ['waitforit.progress'] and putting information in there. In particular "message" contains an HTML message for the user (e.g., if you want to show what step the long-running application is working on). "percent" is used for a progress bar; it should be a number from 0 to 100. The value in progress is sent via JSON, so you should use only strings (preferably unicode), integers, floats, dictionaries (with string keys) and lists. -- Ian Bicking | [EMAIL PROTECTED] | http://blog.ianbicking.org | Write code, do good | http://topp.openplans.org/careers _______________________________________________ Paste-users mailing list [email protected] http://webwareforpython.org/cgi-bin/mailman/listinfo/paste-users
