File tree Expand file tree Collapse file tree 1 file changed +3
-8
lines changed
apps/webapp/app/v3/services Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ import { machinePresetFromConfig } from "../machinePresets.server";
9
9
import { workerQueue } from "~/services/worker.server" ;
10
10
import { MAX_TASK_RUN_ATTEMPTS } from "~/consts" ;
11
11
import { CrashTaskRunService } from "./crashTaskRun.server" ;
12
+ import { reportInvocationUsage } from "~/services/platform.v3.server" ;
12
13
13
14
export class CreateTaskRunAttemptService extends BaseService {
14
15
public async call (
@@ -149,14 +150,8 @@ export class CreateTaskRunAttemptService extends BaseService {
149
150
}
150
151
151
152
if ( taskRunAttempt . number === 1 && taskRun . baseCostInCents > 0 ) {
152
- await workerQueue . enqueue ( "v3.reportUsage" , {
153
- orgId : environment . organizationId ,
154
- data : {
155
- costInCents : String ( taskRun . baseCostInCents ) ,
156
- } ,
157
- additionalData : {
158
- runId : taskRun . id ,
159
- } ,
153
+ await reportInvocationUsage ( environment . organizationId , taskRun . baseCostInCents , {
154
+ runId : taskRun . id ,
160
155
} ) ;
161
156
}
162
157
You can’t perform that action at this time.
0 commit comments