Skip to content

Commit 2490882

Browse files
committed
reportInvocationUsage for the runAttemptStarted event
1 parent 1238ef7 commit 2490882

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

apps/webapp/app/v3/runEngineHandlers.server.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,13 +220,13 @@ export function registerRunEngineEventBusHandlers() {
220220
}
221221
});
222222

223-
engine.eventBus.on("runRetryScheduled", async ({ time, run, organization }) => {
223+
engine.eventBus.on("runAttemptStarted", async ({ time, run, organization }) => {
224224
try {
225225
if (run.attemptNumber === 1 && run.baseCostInCents > 0) {
226226
await reportInvocationUsage(organization.id, run.baseCostInCents, { runId: run.id });
227227
}
228228
} catch (error) {
229-
logger.error("[runRetryScheduled] Failed to report invocation usage", {
229+
logger.error("[runAttemptStarted] Failed to report invocation usage", {
230230
error: error instanceof Error ? error.message : error,
231231
runId: run.id,
232232
orgId: organization.id,

0 commit comments

Comments
 (0)