MCPcopy Index your code
hub / github.com/simstudioai/sim / flushUsage

Function flushUsage

apps/sim/app/api/wand/route.ts:394–407  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

392 let usageRecorded = false
393
394 const flushUsage = async () => {
395 if (usageRecorded || !finalUsage) {
396 return
397 }
398
399 usageRecorded = true
400 await updateUserStatsForWand(
401 billingUserId,
402 workspaceId,
403 finalUsage,
404 requestId,
405 isBYOK
406 )
407 }
408
409 try {
410 let buffer = ''

Callers 1

startFunction · 0.85

Calls 1

updateUserStatsForWandFunction · 0.85

Tested by

no test coverage detected