Since I assume you're using swish-e and the spidering capabilities of it, you're going to have to think about this a little more if you want indexing status to get sent to the browser.
How's this for an idea....
1. Fork the process of doing the index in your shell script so that the external action returns immediately.
2. have your swish-e call dump it's results to a temporary text file instead of standard output
3. write another taf file that parses and displays the status information that you're looking for from the temp text file.
4. have your original taf redirect to that "status displaying" taf.
5. have the status displaying taf file that reads the temp file, either refresh automatically every so many seconds, or have it be up to the user to click a "refresh" button if they're too impatient to wait a couple minutes for swish-e to finish.
5a. If you don't like the refresh idea, you could probably write something up in a different language besides tango that would do the equivilant of a "tail -f" to the browser with the contents of that temp file.
Thoughts?
/John
Bill Conlon wrote:
of course! thanks.
Bill,
The tango PUSH function pushes the results of the specified action AFTER it has been processed by the server (by keeping the HTTP connection open and sending the browser a content-length: unspecified header, then sending "blocks" of the results HTML), so if you wanted to get results line by line as they were returned, you'd have to write a shell script that returned a single result and read an environment variable (a counter). Then you'd put your external action in a loop and assign the environment variable to be the loop counter.
In other words, the "loop" must be done in Tango and not in your script... as the PUSH happens after the end of a specified action (in this case your External Action).
Hope this helps...
Happy Coding!
Jim Kass Web Developer
-- Forestweb: The Source for Industry Intelligence Best Content -- Most Relevant -- Best Delivery http://www.forestweb.com (310) 553 - 0008
-----Original Message----- From: Bill Conlon [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 05, 2003 12:06 PM To: Witango-Talk Subject: Witango-Talk: push for external action
I am running an external action (shell script to invoke the swish-e indexer). From the command line this returns information line by line in the terminal. Likewise, it returns the results to witango in @@request$resultset.
I would like to push the results, line by line to the browser. It seems like push is operating, because the browser does not time out during the two minute indexing run. But results are not displayed in the browser until indexing is complete.
Within the Extenal action I have a ResultsHTML attribute. I have tried both: @@request$results and <@ROWS>@@request$resultset[<@CURROW>,1]<br /></@ROWS> as the ResultsHTML. Same results with Mac Mozilla 1.5 and Mac IE 5.2.
Any suggestions?
Bill Conlon
To the Point 345 California Avenue Suite 2 Palo Alto, CA 94306
office: 650.327.2175 fax: 650.329.8335 mobile: 650.906.9929 e-mail: mailto:[EMAIL PROTECTED] web: http://www.tothept.com
________________________________________________________________________ TO UNSUBSCRIBE: Go to http://www.witango.com/maillist.taf
________________________________________________________________________ TO UNSUBSCRIBE: Go to http://www.witango.com/maillist.taf
Bill Conlon
To the Point 345 California Avenue Suite 2 Palo Alto, CA 94306
office: 650.327.2175 fax: 650.329.8335 mobile: 650.906.9929 e-mail: mailto:[EMAIL PROTECTED] web: http://www.tothept.com
________________________________________________________________________ TO UNSUBSCRIBE: Go to http://www.witango.com/maillist.taf
________________________________________________________________________ TO UNSUBSCRIBE: Go to http://www.witango.com/maillist.taf
