0
Résolu

Is there a way to change the timeout?

jobu1342 il y a 10 ans mis à jour il y a 10 ans 4
I developed a plugin to provide an easy way to internally manage one of our servers. Some of the operations take some time, though, and cause ajenti to fade out and display "Reconnecting" with the spinning arrow. Ajenti never reconnects, though, even after the operations complete (which I verified by opening a new Ajenti window while the "Reconnecting" message continued to display.

I can see three options, but I don't know how to execute any of them. Here they are, listed in order of preference:

  1. Tell the browser that the user's request is in-progress so Ajenti doesn't time out.
  2. Fix whatever problem causes "Reconnecting" to fail (so that the browser is able to reconnect to Ajenti after the plugin finishes the requested operation).
  3. Change the connection timeout to something large enough to handle the script execution without displaying "Reconnecting".
Is what I'm trying to accomplish possible?

Solution

+1
Solution
Résolu
If the timeout is caused by a long-running child process, you can easily fix that by upgrading python-gevent to 1.0+. It will prevent this kind of timeouts.
JE SUIS SATISFAIT
Thanks for the timely reply!
Note de satisfaction par jobu1342 il y a 10 ans
+1
Solution
Résolu
If the timeout is caused by a long-running child process, you can easily fix that by upgrading python-gevent to 1.0+. It will prevent this kind of timeouts.
Awesome! That works for option #2. Is there a way to tell the browser that Ajenti is working so it doesn't timeout?
How exactly is your background task launched? With gevent 1.0, Ajenti will be able to send keepalive signals to browser, and the connection won't timeout no matter how long the process takes to complete.
There are a series of tasks, actually. I use python where possible, and otherwise I launch shell scripts. As I'm thinking this through, I think I need to ask a different question - I'll post a new thread.