fix: serialize SQLite close with cancelled worker transactions
Rebuild & Deploy / rebuild (push) Successful in 4m1s
Rebuild & Deploy / rebuild (push) Successful in 4m1s
This commit is contained in:
1 parent
5a02b8f0c1
commit
ea4e191400
3 files changed
+79
-2
No files matched your search
+5
-1
@@ -103,7 +103,11 @@ class Accounts:
|
||||
os.chmod(companion, 0o600)
|
||||
|
||||
def close(self):
|
||||
self.db.close()
|
||||
# Cancelling an asyncio.to_thread caller does not stop its SQLite worker.
|
||||
# ChatStore/FeatureStore share this connection and lock; wait for any
|
||||
# in-flight transaction before closing the native connection.
|
||||
with self.lock:
|
||||
self.db.close()
|
||||
|
||||
def users(self):
|
||||
with self.lock:
|
||||
|
||||
Reference in new issue
Block a user