-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When running scheduled tasks, the webpage cannot be opened #149
Comments
not really sure what's going on, can you share the output of the browser console and/or the python terminal output? |
I want to mention that I experience this same issue if I declare my task as async. After the run button is pressed, I am directed to the run page but get "run not found" and then any attempt to browse to the main page of the site just gives me a Login button (I don't have any auth configured) |
+1, basically any time any of the runs are happening, the web UI ceases to be responsive/usable. I can only use the web UI in between runs. For clarity - the underlying runs are behaving as expected, i.e. they're doing their job. It's only the UI that becomes unresponsive until the jobs are done |
same for me |
same is happening for me as well. |
Well, I dont usually do this (comment, lol), but this was enough of a pain that I figured maybe I should update on my findings. So, when listening in on the web requests via devtools it is pretty obvious that "/api/auth/whoami" blocks. Since its an async function fastapi runs it in the same event loop as all async endpoints in FastAPI. On removing async from the task the issue stops occurring. Its not just whoami though, the rest of the internal routes are async too - so if we remove async from get_current_user_no_auth it wont really help. The really evil thing here is that regardless of if its a true async task or not - parts of it are bound to have non-async code which will cause this at when they run. We COULD use ast to iterate over the task function's code and for every section that does not have await in it push run_in_threadpool into it - but it is so intrusive... I might be wrong though :P |
Hi
I'm not sure if it's an issue on my end, but when I click the (run) button then, the page cant displayt any more, and the request is constantly pending. When viewed through the command line, the task's output seems normal.
The text was updated successfully, but these errors were encountered: