You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 10628ad
Browse filesBrowse the repository at this point in the historyBrowse files
return{state: "failed",detail: state==="missing" ? "The run supervisor disappeared before recording a result." : "The supervised agent process exited unsuccessfully.",command: result};
121
+
constinspect=`sudo systemctl show ${shellAtom(vm)} --property=LoadState,ActiveState,SubState,Result,ExecMainCode,ExecMainStatus`;
asyncstopRun(runId: string){awaitthis.authorize("runs:write");conststopped=awaitnewRunQueryRepository(databaseFor(this.env),this.auth.tenantId).stop(runId);if(!stopped)thrownewServiceError(409,"operation_failed","Run is not active");if(this.env.SCHEDULER)awaitthis.env.SCHEDULER.get(this.env.SCHEDULER.idFromName("global")).fetch("https://scheduler/wake",{method: "POST"});returnstopped;}
Copy file name to clipboardExpand all lines: packages/app/src/postgres/artifact-repository.ts
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@ export class ArtifactRepository {
11
11
awaitclient.query(`INSERT INTO app.run_artifacts(tenant_id,run_id,id,kind,object_key,provider,format,format_version,cli_version,native_session_id,byte_size,sha256,state)
ON CONFLICT (tenant_id,object_key) DO UPDATE SET byte_size=excluded.byte_size,sha256=excluded.sha256,state=excluded.state`,[this.tenantId,input.runId,id,input.kind,input.objectKey,input.provider,input.format,input.formatVersion??null,input.cliVersion??null,input.nativeSessionId??null,input.byteSize,input.sha256,input.state??"stored"]);
14
-
awaitclient.query("UPDATE app.runs SET artifact_state='stored',artifact_error=NULL,updated_at=now() WHERE tenant_id=$1 AND id=$2",[this.tenantId,input.runId]);
14
+
awaitclient.query("UPDATE app.runs SET artifact_state='stored',updated_at=now() WHERE tenant_id=$1 AND id=$2",[this.tenantId,input.runId]);
15
15
});
16
16
}
17
17
asynclist(runId: string){return(awaitthis.database.pool.query("SELECT id,kind,object_key,provider,format,format_version,cli_version,native_session_id,byte_size,sha256,state,created_at FROM app.run_artifacts WHERE tenant_id=$1 AND run_id=$2 ORDER BY created_at,id",[this.tenantId,runId])).rows;}
0 commit comments