RE: [Zope] (newbie) External Method continues to run.
[ working4aliving]
Hello group, I'm validating the resolution of url's supplied by customers through the following... (testing w/ 7000 records right now) my DTML method calls a python script that calls a zsql method. It then passes the result (row by row) to a hacked version of webclient.py, and my result gets passed back (1 or 0). I list the results (failures) in a resulting method. If I cancel the request (via the stop button on the browser) my logging shows the external method contining to run. Realizing that it's server side, it's not necessarily wrong, but if anyone can give me an explaination on why (or more like how to stop it), that'd be great.
Thanks for your help in advance.
To get the server to do something, you have to send it a message. In principle, if the browser closes the connection the server might see a socket error, but I do not think that Zope gives you access to that. Besides, then you would probably have to handle all the socket errors yourself, which you do not want to get into. Maybe Dieter or someone else knows how you could pursue this approach. Supposing that you had a link on the page that let the browser send a message to the server. You could click on the link after cancelling the page. Well, the external method is still busy, and the server is not going to be able to talk to it unless it is multi-threaded (which would get complicated) or unless you had the server set a value in a file somewhere that the external method periodically checks. If you did that, you would have to track which instance of the external method gets which signal, so that you would have to track sessions. The whole thing seems so tricky that it would best be left undone except under great duress. Cheers, Tom P
participants (1)
-
Passin, Tom