billing: bomb out early if we have unsent logs to avoid duplicating work that's never used
This commit is contained in:
@ -433,7 +433,7 @@ class ArcadeData(BaseData):
|
||||
self.logger.error(f"Failed to add billing charge for machine {machine_id}!")
|
||||
return None
|
||||
return result.lastrowid
|
||||
|
||||
|
||||
async def billing_get_last_charge(self, machine_id: int, game_id: str) -> Optional[Row]:
|
||||
result = await self.execute(billing_charge.select(
|
||||
and_(billing_charge.c.machine == machine_id, billing_charge.c.game_id == game_id)
|
||||
@ -511,7 +511,7 @@ class ArcadeData(BaseData):
|
||||
|
||||
if result is None:
|
||||
self.logger.error(f"Failed to add playcount for machine {machine_id} running {game_id}")
|
||||
|
||||
|
||||
async def billing_get_playcount_3mo(self, machine_id: int, game_id: str) -> Optional[List[Row]]:
|
||||
result = await self.execute(billing_playct.select(and_(
|
||||
billing_playct.c.machine == machine_id,
|
||||
|
Reference in New Issue
Block a user