python-swat
python-swat copied to clipboard
Set action timeout
Hi,
I noticed that sometimes when an action is launched on the cas server, it may stop responding and the action remains running forever. I believe this is an issue with the cas server itself and has nothing to do with swat, however I was wandering whether it is possible to set a global timeout for all cas actions spawned from swat, so that if an action lasts more than a given time (i.e. 1 hour) it is aborted and an exception is raised. Is that possible?
I asked around and haven't found a timeout feature. There is an unpublished (and likely unsupported) action that you could try to cancel the action. You would have to bring up another session and run it though. Since they aren't public, you have to call them in a special way.
conn._raw_retrieve('session.cancelaction', uuid='<hung-session-id>')
Thank you very much, very interesting, I'll try it out and update this issue if I find something useful.