Hello,here is my problem : lets' assume that i connect to the following URL :and that the myfunc function in default.py makes a call to a function f(param) which could take a long time depending on the value of param. I wan't to stop my function f() if it's time execution exceeds 3 seconds. In that case i wan't to send a flash message which contains the message "Time limit exceeded"
Can you help me. I tried to use SIGALRM but wsgi does not allow to trap signals. I changed the default option in wsgi to catch SIGALRM but the i have an error which says that the signal function can only be used in the main thread which is the restricted.py script in gluon directory. Do i need to modify this script ?Thanks for your help
On Tuesday, January 19, 2021 at 10:19:38 PM UTC-8 veron.p...@gmail.com wrote:Hello,here is my problem : lets' assume that i connect to the following URL :and that the myfunc function in default.py makes a call to a function f(param) which could take a long time depending on the value of param. I wan't to stop my function f() if it's time execution exceeds 3 seconds. In that case i wan't to send a flash message which contains the message "Time limit exceeded"Would it be better to use the scheduler? One of its purposes is to deal with long-running processes without holding up the response to the user. The work flow might be to have myfunc queue a worker and pass param to it, return a "pending result" to the user, and then use jquery and a client-side timer to poll for results.