Skip to content

Commit

Permalink
fix: remove hardcoded memsize system option (#1188)
Browse files Browse the repository at this point in the history
  • Loading branch information
smorrisj committed Sep 5, 2024
1 parent 4fa0b90 commit 94d666c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 14 deletions.
14 changes: 9 additions & 5 deletions client/src/connection/rest/context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@ import { l10n } from "vscode";

import axios, { AxiosResponse } from "axios";

import { Context, ContextSummary, ContextsApi, Link } from "./api/compute";
import {
Context,
ContextSummary,
ContextsApi,
Link,
SessionRequest,
} from "./api/compute";
import { BaseCompute, Compute, getApiConfig } from "./common";
import { ComputeSession } from "./session";

Expand Down Expand Up @@ -73,15 +79,13 @@ export class ComputeContext extends Compute {
}

//Create the session
//TODO: Add session create options
//TODO: Session request should be an interface
const body = {
const body: SessionRequest = {
version: 1,
name: "mysess",
description: "This is a session",
attributes: {},
environment: {
options: ["-validmemname EXTEND", "-validvarname ANY", "-memsize 0"],
options: ["-validmemname EXTEND", "-validvarname ANY"],
autoExecLines: [],
},
};
Expand Down
12 changes: 3 additions & 9 deletions client/src/connection/rest/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,11 @@ import { l10n } from "vscode";

import axios, { AxiosResponse } from "axios";

import { Link, Server, ServersApi } from "./api/compute";
import { Link, Server, ServersApi, SessionRequest } from "./api/compute";
import { BaseCompute, Compute, getApiConfig, stateOptions } from "./common";
import { ComputeSession } from "./session";

const DEFAULT_COMPUTE_OPTS = [
"-validmemname EXTEND",
"-validvarname ANY",
"-memsize 0",
];
const DEFAULT_COMPUTE_OPTS = ["-validmemname EXTEND", "-validvarname ANY"];

export class ComputeServer extends Compute {
api;
Expand Down Expand Up @@ -87,9 +83,7 @@ export class ComputeServer extends Compute {
}

//Create the session
//TODO: Add session create options
//TODO: Session request should be an interface
const body = {
const body: SessionRequest = {
version: 1,
name: "mysess",
description: "This is a session",
Expand Down

0 comments on commit 94d666c

Please sign in to comment.