sympy-bot-old icon indicating copy to clipboard operation
sympy-bot-old copied to clipboard

Some way for the bot to self-terminate instead of hang

Open asmeurer opened this issue 11 years ago • 3 comments

If the tests of a PR hang, then the bot will also hang, which isn't very good for headless machines. There should be some failsafe. An easy thing to do would be to add a timeout. The default could be something large (say 4 hours per interpreter), but it could be configured. This can be implemented using alarms from the signals module.

Another way would be to exit if no activity happens for some given amount of time. This is what Travis does. If no output is given in 10 minutes, it assumes the tests are hanging and gives up. I think to implement this, one just needs to reset the alarm every time something is written.

Regardless, we also have to make sure that the alarm is disabled at the end with a finally block so that it doesn't trigger after the tests are done.

asmeurer avatar Mar 17 '13 03:03 asmeurer