feat(balance): invalidate llmage Redis balance cache after recharge
This commit is contained in:
parent
16fdf90513
commit
11475d31c3
@ -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):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user