On Mon, Jun 28, 2010 at 2:50 PM, Gustavo Narea <span dir="ltr">&lt;<a href="mailto:me@gustavonarea.net">me@gustavonarea.net</a>&gt;</span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

<a href="http://pythonpaste.org/waitforit/" target="_blank">http://pythonpaste.org/waitforit/</a><br></blockquote><div><br>It will address this problem, but not with mod_wsgi as it relies on threads to handle the queuing (the request is deferred to a thread, and in-memory data structures are used to get the result).<br>

<br>One of the solutions proposed (&quot;Take them immediately to a secondary page, then submit the actual job automatically on that second page.&quot;) actually seems most reasonable to me, as it allows you to give any UI you want (where writing out a response incrementally is fairly constrained), and can be generalized fairly easily.  And if you use a little persistence (something WaitForIt doesn&#39;t have the benefit of using) you could fire off XMLHttpRequests to get an update.  Hmm... WaitForIt would almost be better simply doing this, except it tries to be clever by avoiding interstitial pages if the response isn&#39;t slow.<br>

<br>And then there&#39;s really cheap tricks, like:<br><br>&lt;button type=&quot;submit&quot; onclick=&quot;this.innerHTML = &#39;submitting...&#39;; this.disabled = true&quot;&gt;Submit&lt;/button&gt;<br></div></div><br>

-- <br>Ian Bicking  |  <a href="http://blog.ianbicking.org">http://blog.ianbicking.org</a><br>