Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion cashu/core/db.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,10 @@ def _set_sqlite_pragma(dbapi_connection, connection_record):
try:
cursor = dbapi_connection.cursor()
cursor.execute("PRAGMA foreign_keys=ON;")
cursor.execute("PRAGMA journal_mode=WAL;")
cursor.close()
except Exception as e:
logger.warning(f"Could not enable SQLite PRAGMA foreign_keys: {e}")
logger.warning(f"Could not enable SQLite PRAGMAs: {e}")

self.async_session = sessionmaker(
self.engine, # type: ignore
Expand Down
1 change: 1 addition & 0 deletions tests/mint/test_mint_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,7 @@ async def test_db_events_add_client(wallet: Wallet, ledger: Ledger):
client.add_subscription(
JSONRPCSubscriptionKinds.BOLT11_MELT_QUOTE, [quote.quote], "subId"
)
await asyncio.sleep(0.1)
quote_pending = await ledger.db_write._set_melt_quote_pending(quote)
await asyncio.sleep(0.1)
notification = JSONRPCNotification(
Expand Down