Make the session be scoped to the local thread.
Make the session be scoped to the local thread.

This may or may not be making any difference.

tiddlyweb/tiddlywebplugins.sqlalchemy,tiddlyweb/tiddlywebplugins.sqlalchemy