feat: add gc disk relief command
This commit is contained in:
@@ -26,6 +26,7 @@ import { isHelpToken, rootHelp, serverHelp, sshHelp, staticNamespaceHelp } from
|
||||
import { runServerCleanupCommand } from "./src/server-cleanup";
|
||||
import { runHwlabCdCommand } from "./src/hwlab-cd";
|
||||
import { runHwlabG14Command } from "./src/hwlab-g14";
|
||||
import { runGcCommand } from "./src/gc";
|
||||
|
||||
const remoteOptions = extractRemoteCliOptions(process.argv.slice(2));
|
||||
const args = remoteOptions.args;
|
||||
@@ -389,6 +390,14 @@ async function main(): Promise<void> {
|
||||
}
|
||||
}
|
||||
|
||||
if (top === "gc") {
|
||||
const result = await runGcCommand(config, args.slice(1));
|
||||
const ok = (result as { ok?: unknown }).ok !== false;
|
||||
emitJson(commandName, result, ok);
|
||||
if (!ok) process.exitCode = 1;
|
||||
return;
|
||||
}
|
||||
|
||||
if (top === "microservice") {
|
||||
const result = await runMicroserviceCommand(config, args.slice(1));
|
||||
const ok = resultOk(result);
|
||||
|
||||
Reference in New Issue
Block a user