Skip to content

Commit bb5f836

Browse files
committed
Couple tweaks
1 parent 9523366 commit bb5f836

File tree

2 files changed

+8
-15
lines changed

2 files changed

+8
-15
lines changed

packages/core/src/v3/usage/prodUsageManager.ts

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,6 @@ export class ProdUsageManager implements UsageManager {
7777
}
7878

7979
async flush() {
80-
console.log("Flushing usage");
81-
8280
return await this.#reportUsage();
8381
}
8482

@@ -105,22 +103,10 @@ export class ProdUsageManager implements UsageManager {
105103

106104
this._lastSample = sample;
107105

108-
console.log("Reporting usage", {
109-
cpuTimeSinceLastSample,
110-
});
111-
112106
if (cpuTimeSinceLastSample <= 0) {
113107
return;
114108
}
115109

116-
const now = performance.now();
117-
118110
await client.sendUsageEvent({ durationMs: cpuTimeSinceLastSample });
119-
120-
const durationInMs = performance.now() - now;
121-
122-
console.log("Reported usage", {
123-
durationInMs,
124-
});
125111
}
126112
}

packages/trigger-sdk/src/v3/shared.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,14 @@ export type TaskOptions<
142142
memory?: MachineMemory;
143143

144144
/** Preset to use for the machine. Defaults to small-1x */
145-
preset?: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x";
145+
preset?:
146+
| "micro"
147+
| "small-1x"
148+
| "small-2x"
149+
| "medium-1x"
150+
| "medium-2x"
151+
| "large-1x"
152+
| "large-2x";
146153
};
147154
/** This gets called when a task is triggered. It's where you put the code you want to execute.
148155
*

0 commit comments

Comments
 (0)