Come to think of it, I think the (empty) status file may be created at an earlier time, before the self-refreshing CGI script or the sequence of perl programs both get kicked off. The name of the file is then passed to the CGI script and thence to the sequence of perl programs so that all know what status file they are dealing with. Gimme a break, I wrote that web stats package 10 years ago. =)

Tony

T. William Schmidt wrote:

All of this is very problematic to achieve robustness given the nature of browsers and the http protocol. Can you redesign the programs so that once one is launched it does not depend on a continuous browser connection? Make the database programs asynchronous. If the user who requested the transaction must be notified of the program's completion status, send the confirmation by email.

Will

At 05:38 PM 6/20/2004 -0700, Anthony Nemmer wrote:

[EMAIL PROTECTED] wrote:


In a message dated 20/06/2004 17:48:21 GMT Daylight Time, [EMAIL PROTECTED] writes:

I maintain an administration site that allows users to execute perl
programs using their web browser. I've run into a couple programs that
do not complete execution prior to the browser timing out. When the
browser quits, the perl program quits before it's done. I end up with a
mess because these perl programs are manipulating our database.


Question?  How can I force the browser connection to stay active  until
after a perl program finishes execution?

The only work around I've found is to run from the command line. This
connection never quits before it's time.


I appreciate any  advice on this.



Not really been able to find a way around this, but I did have a similar problem. One solution is to keep writing something to the browser (eg, a series of dots to show progress), this tends to keep it active, but may not be practical.
The best solution is to implement a lock-out whilst the perl program is
running, so that it cannot be run more than once at a time. Simple to do - just set a value in an external file.
This can also be used to allow you to interrogate what the perl program is
currently doing.

Better than that, write status information to the file and metarefresh the browser with a cgi script that reads from the status file and displays how far the perl program has gotten or what it is doing. You kill a couple of birds with one file this way.


Tony

--
Rich  Mellor RWAP Services
35 Chantry Croft, Kinsley, Pontefract, West  Yorkshire, WF9 5JH
TEL: 01977 610509
Visit our website at  URL:http://www.rwapsoftware.co.uk

Stuck with ordinary dial up internet connection ?? Read our review of internet accelerators and broadband at:
URL: http://www.rwapadventures.com/Services/reviews.html





------------------------------------------------------------------------

_______________________________________________
ActivePerl mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



--

SKYKING, SKYKING, DO NOT ANSWER.


_______________________________________________ ActivePerl mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Regards,
Will Schmidt

WilliamSchmidt.com, LLC
11201 NW 77th Street
Terrebonne, OR  97760
541 504-0290
[EMAIL PROTECTED]
http://www.williamschmidt.com/





--

SKYKING, SKYKING, DO NOT ANSWER.


_______________________________________________ ActivePerl mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to