fix: summarize job status output
This commit is contained in:
+7
-2
@@ -2,7 +2,7 @@ import { readConfig } from "./src/config";
|
||||
import { debugDispatch, debugHealth, debugSshPool, debugTask, isDebugDispatchCommand, type DebugDispatchCommand } from "./src/debug";
|
||||
import { isRebuildableService, rebuildService, restartService, stackLogs, stackStatus, startStack, stopStack, unsupportedRebuildService, unsupportedRestartService } from "./src/docker";
|
||||
import { emitError, emitJson, emitText, isRenderedCliResult } from "./src/output";
|
||||
import { cancelJob, jobWithTail, listJobs, listJobsSummary, readJob, runJob } from "./src/jobs";
|
||||
import { cancelJob, jobWithTail, listJobs, listJobsSummary, readJob, renderJobStatusSummary, runJob } from "./src/jobs";
|
||||
import { checkHelp, parseCheckOptions, runChecks, runRecoveryGuardrailsCheck } from "./src/check";
|
||||
import { runSsh } from "./src/ssh";
|
||||
import { autoRemoteCiPublishUserServiceDryRunPlan, extractRemoteCliOptions, runRemoteCli } from "./src/remote";
|
||||
@@ -551,7 +551,12 @@ async function main(): Promise<void> {
|
||||
}
|
||||
if (sub === "status") {
|
||||
const id = third === "latest" || third === undefined ? latestJobId() : third;
|
||||
emitJson(commandName, { job: jobWithTail(readJob(id), boundedNumberOption("--tail-bytes", 12000, 500_000)) });
|
||||
const job = jobWithTail(readJob(id), boundedNumberOption("--tail-bytes", 12000, 500_000));
|
||||
if (args.includes("--full") || args.includes("--raw")) {
|
||||
emitJson(commandName, { job });
|
||||
return;
|
||||
}
|
||||
emitText(renderJobStatusSummary(job).renderedText, commandName);
|
||||
return;
|
||||
}
|
||||
if (sub === "cancel") {
|
||||
|
||||
Reference in New Issue
Block a user