-
Notifications
You must be signed in to change notification settings - Fork 84
Sqa panel code break for multiple threads #345
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
Comments
Do you connect to the database in your app's |
Thank you for you response. We actually avoided using database calls inside the different threads as we call them only to parallelise some web requests. Though we used scoped session that is a thread local and each thread uses another session, which seems to be an appropriate use. so I wonder whether the connection should not be assumed to be used by one thread. |
Hi again, |
Can you show some sort of snippet of what’s going on? Are you passing a session between threads? That’s not supported by SQLAlchemy at all. They are not threadsafe. |
Sqa.py code is adding to the DB connection the attribute
pdtb_start_timer
hereThen it removes this attribute. When accessing the DB with multiple threads this code breaks if both threads are executing and then the first that reaches the after will remove it and the second will fail.
Using latest version, 4.5
Unfortunately this code will still be executed, even is this panel is not configured. I tried to fix this issue without any luck so far.
Maybe one way to start is to isolate this code so it can actually be switched off.
The text was updated successfully, but these errors were encountered: