fix: serialize SQLite close with cancelled worker transactions
Rebuild & Deploy / rebuild (push) Successful in 4m1s

This commit is contained in:
snowspeeder committed 2026-10-04 08:32:33 -04:00
1 parent 5a02b8f0c1
commit ea4e191400
3 files changed
+79 -2

No files matched your search

+5 -1
View File
@@ -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: