<?xml version="1.0" encoding="windows-1252"?>
<node id="68505" title="Re: push_handler and status page question." created="2001-03-30 20:06:50" updated="2005-07-19 14:08:39">
<type id="11">
note</type>
<author id="28290">
sutch</author>
<data>
<field name="doctext">
One way to handle this is to use an HTML redirect.  This has the added benefit of freeing memory in use by mod_perl processes that would otherwise be used for each waiting client connection.&lt;p&gt;

An outline of how I've planned to handle it (note: I haven't implemented it yet, but plan to soon):&lt;p&gt;

&lt;code&gt;
receive request;
if (request has no job_id) {
  create new job_id;
  start processing external commands (providing job_id);
  return an HTTP redirect with a 10 second pause, such as:
    &lt;meta http-equiv="REFRESH" content="10;URL=http://sample.com/?id=job_id"&gt;
} else {
  if (external commands have completed) {
    return results;
  } else {
    return the HTTP redirect again;
  }
}
&lt;/code&gt;</field>
<field name="root_node">
68498</field>
<field name="parent_node">
68498</field>
</data>
</node>
