diff --git a/accounting/recharge.py b/accounting/recharge.py index ee87d8f..ba4bd7a 100644 --- a/accounting/recharge.py +++ b/accounting/recharge.py @@ -62,6 +62,12 @@ class RechargeBiz(PFBiz): ao = Accounting(self) await self.write_bill(sor) await ao.do_accounting(sor) + # Invalidate llmage Redis balance cache so reserve sees new balance + try: + from llmage.balance import invalidate_balance_cache + await invalidate_balance_cache(self.customerid) + except Exception as e: + debug(f'llmage balance cache invalidate skipped: {e}') return True async def write_bill(self, sor):