Skip to content

Commit

Permalink
do not lock the invoice dispatcher
Browse files Browse the repository at this point in the history
  • Loading branch information
callebtc committed Jul 5, 2024
1 parent 03f90c5 commit de68c28
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions cashu/mint/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ async def invoice_listener(self, backend: LightningBackend) -> None:
async def invoice_callback_dispatcher(self, checking_id: str) -> None:
logger.debug(f"Invoice callback dispatcher: {checking_id}")
async with self.db.get_connection(
lock_table="mint_quotes",
lock_select_statement=f"checking_id='{checking_id}'",
lock_timeout=1,
# lock_table="mint_quotes",
# lock_select_statement=f"checking_id='{checking_id}'",
# lock_timeout=1,
) as conn:
quote = await self.crud.get_mint_quote(
checking_id=checking_id, db=self.db, conn=conn
Expand Down
2 changes: 1 addition & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
settings.mint_lnd_enable_mpp = True
settings.mint_clnrest_enable_mpp = False
settings.mint_input_fee_ppk = 0
settings.db_connection_pool = True
settings.db_connection_pool = False

assert "test" in settings.cashu_dir
shutil.rmtree(settings.cashu_dir, ignore_errors=True)
Expand Down

0 comments on commit de68c28

Please sign in to comment.