Skip to content

Commit c9775c4

Browse files
fix: send params to restart correctly (#232)
1 parent 8319c84 commit c9775c4

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/API.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ import type {
5757
} from "./api-clients/client";
5858
import { PitcherManagerResponse } from "./types";
5959

60-
6160
export interface APIOptions {
6261
apiKey: string;
6362
config?: Config;
@@ -322,6 +321,7 @@ export class API {
322321

323322
async startVm(id: string, options?: StartVmOptions) {
324323
const { retryDelay = 200, ...data } = options || {};
324+
325325
const handledResponse = await retryWithDelay(
326326
async () => {
327327
const response = await vmStart({

src/Sandboxes.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,11 @@ export class Sandboxes {
145145

146146
try {
147147
const startResponse = await this.api.startVm(sandboxId, {
148-
...opts,
149148
retryDelay: 1000,
149+
automatic_wakeup_config: opts?.automaticWakeupConfig,
150+
hibernation_timeout_seconds: opts?.hibernationTimeoutSeconds,
151+
ipcountry: opts?.ipcountry,
152+
tier: opts?.vmTier?.name,
150153
}); // Use 1000ms delay for restart
151154

152155
return new Sandbox(sandboxId, this.api, startResponse, this.tracer);

0 commit comments

Comments
 (0)