long background tasks

2001-01-25 Thread Louis-David Mitterrand
Hello, Were are trying to run long a task (DB import) from a HTML::Mason page and are trying to send an immediate response to the user while the task is running. Here is our pseudo-code: %init sub long_running_task { # lottsa long, boring stuff }

Re: long background tasks

2001-01-25 Thread Matt Sergeant
On Thu, 25 Jan 2001, Louis-David Mitterrand wrote: Hello, Were are trying to run long a task (DB import) from a HTML::Mason page and are trying to send an immediate response to the user while the task is running. Here is our pseudo-code: %init sub long_running_task { # lottsa

Re: long background tasks

2001-01-25 Thread Paul
--- Louis-David Mitterrand [EMAIL PROTECTED] wrote: Hello, Were are trying to run long a task (DB import) from a HTML::Mason page and are trying to send an immediate response to the user while the task is running. Here is our pseudo-code: %init sub long_running_task { # lottsa

Re: long background tasks

2001-01-25 Thread Gerd Kortemeyer
You need $r-flush(); 1) Send out header 2) Use $r-print(...) to give some "please be patient" message or something 3) End the first chunk of info with "br\n", so that the browser knows enough about the page layout to start page output. 4) Use $r-flush(); 5) Do your long task 6) Produce rest of

Re: long background tasks

2001-01-25 Thread Gerd Kortemeyer
Sorry all, this should have been $r-rflush() - too many r's ... I guess the additional "r" was meant as a reminder that this is a low-level call, and flushing buffers results in a performance hit, and should not be done for no good reason. - Gerd. Gerd Kortemeyer wrote: You need $r-flush();