python-swat icon indicating copy to clipboard operation
python-swat copied to clipboard

Set action timeout

Open gygabyte017 opened this issue 3 years ago • 2 comments

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?

gygabyte017 avatar Mar 22 '21 10:03 gygabyte017

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>')

kesmit13 avatar Mar 25 '21 20:03 kesmit13

Thank you very much, very interesting, I'll try it out and update this issue if I find something useful.

gygabyte017 avatar Mar 29 '21 09:03 gygabyte017