MCPcopy Create free account
hub / github.com/TheSmallHanCat/flow2api / increment_token_stats

Method increment_token_stats

src/core/database.py:1202–1209  ·  view source on GitHub ↗

Increment token statistics (delegates to specific methods)

(self, token_id: int, stat_type: str)

Source from the content-addressed store, hash-verified

1200
1201 # Token stats operations (kept for compatibility, now delegates to specific methods)
1202 async def increment_token_stats(self, token_id: int, stat_type: str):
1203 """Increment token statistics (delegates to specific methods)"""
1204 if stat_type == "image":
1205 await self.increment_image_count(token_id)
1206 elif stat_type == "video":
1207 await self.increment_video_count(token_id)
1208 elif stat_type == "error":
1209 await self.increment_error_count(token_id)
1210
1211 async def get_token_stats(self, token_id: int) -> Optional[TokenStats]:
1212 """Get token statistics"""

Callers 2

record_usageMethod · 0.80
record_errorMethod · 0.80

Calls 3

increment_image_countMethod · 0.95
increment_video_countMethod · 0.95
increment_error_countMethod · 0.95

Tested by

no test coverage detected