Some SQLAlchemy session cleanup#98
Conversation
Rebuilt StarryPy#93 on development, then split out the plugin part. This is the session handling cleanup. The point is to abstract any session management away from the endpoints are using the data, and to initiate a session per transaction rather than leaving one session open for the lifetime of the server (the latter was causing concurrency issues when different factories were accessing the session).
|
Thank you very much! While testing your changes, I noticed that the plugin_store doesn't work anymore: Can you do something about it? |
|
I'm not sure how I missed that, since the player greeter executes every time, but it wasn't giving me errors. Anyway, it's pretty easy to tell what the issue is. Shouldn't be hard to tape over, but the method that's throwing the error is a little too clever by half--it might be worthwhile to figure out how to pass that invisibly from the plugin rather than inspecting the stack. Anyway, I'll throw something together |
|
Ok, I've pushed up the requisite fix. Note that give_items() seems to be broken on development head right now (at least for me)--if that is the case for you, you can test this fix by commenting out the give_items and watching the greeter message. |
Some SQLAlchemy session cleanup
|
Thank you very much! Its true that the inspection thing would break sooner or later, however thats something that works for now. |
|
Haha thanks. |
Rebuilt #93 on development, then split out the plugin part.
This is the session handling cleanup. The point is to abstract any session
management away from the endpoints are using the data, and to
initiate a session per transaction rather than leaving one session open
for the lifetime of the server (the latter was causing concurrency issues
when different factories were accessing the session).
Now actually pulling to development. Third time's the charm.