feat(model): expand API response fields to expose full Slurm data
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
@@ -12,17 +12,50 @@ type SubmitJobRequest struct {
|
||||
Environment map[string]string `json:"environment,omitempty"`
|
||||
}
|
||||
|
||||
// JobResponse is the simplified API response for a job.
|
||||
// JobResponse is the API response for a job.
|
||||
type JobResponse struct {
|
||||
JobID int32 `json:"job_id"`
|
||||
Name string `json:"name"`
|
||||
State []string `json:"job_state"`
|
||||
Partition string `json:"partition"`
|
||||
SubmitTime *int64 `json:"submit_time,omitempty"`
|
||||
StartTime *int64 `json:"start_time,omitempty"`
|
||||
EndTime *int64 `json:"end_time,omitempty"`
|
||||
ExitCode *int32 `json:"exit_code,omitempty"`
|
||||
Nodes string `json:"nodes,omitempty"`
|
||||
// Identity
|
||||
JobID int32 `json:"job_id"` // Slurm 作业 ID
|
||||
Name string `json:"name"` // 作业名称
|
||||
State []string `json:"job_state"` // 作业当前状态 (e.g. ["RUNNING"], ["PENDING","REQUEUED"])
|
||||
StateReason string `json:"state_reason,omitempty"` // 作业等待/失败的原因
|
||||
|
||||
// Scheduling
|
||||
Partition string `json:"partition"` // 所属分区
|
||||
QOS string `json:"qos,omitempty"` // 使用的 QOS 策略
|
||||
Priority *int32 `json:"priority,omitempty"` // 作业优先级
|
||||
TimeLimit string `json:"time_limit,omitempty"` // 运行时间限制 (分钟,"UNLIMITED" 表示无限)
|
||||
|
||||
// Ownership
|
||||
Account string `json:"account,omitempty"` // 计费账户
|
||||
User string `json:"user,omitempty"` // 提交用户
|
||||
Cluster string `json:"cluster,omitempty"` // 所属集群
|
||||
|
||||
// Resources
|
||||
Cpus *int32 `json:"cpus,omitempty"` // 分配/请求的 CPU 核数
|
||||
Tasks *int32 `json:"tasks,omitempty"` // 任务数
|
||||
NodeCount *int32 `json:"node_count,omitempty"` // 节点数
|
||||
Nodes string `json:"nodes,omitempty"` // 分配的节点列表
|
||||
BatchHost string `json:"batch_host,omitempty"` // 批处理主节点
|
||||
|
||||
// Timing (Unix timestamp)
|
||||
SubmitTime *int64 `json:"submit_time,omitempty"` // 提交时间
|
||||
StartTime *int64 `json:"start_time,omitempty"` // 开始运行时间
|
||||
EndTime *int64 `json:"end_time,omitempty"` // 结束/预计结束时间
|
||||
|
||||
// Result
|
||||
ExitCode *int32 `json:"exit_code,omitempty"` // 退出码 (nil 表示未结束)
|
||||
|
||||
// IO Paths
|
||||
StdOut string `json:"standard_output,omitempty"` // 标准输出文件路径
|
||||
StdErr string `json:"standard_error,omitempty"` // 标准错误文件路径
|
||||
StdIn string `json:"standard_input,omitempty"` // 标准输入文件路径
|
||||
WorkDir string `json:"working_directory,omitempty"` // 工作目录
|
||||
Command string `json:"command,omitempty"` // 执行的命令
|
||||
|
||||
// Array Job
|
||||
ArrayJobID *int32 `json:"array_job_id,omitempty"` // 数组作业的父 Job ID
|
||||
ArrayTaskID *int32 `json:"array_task_id,omitempty"` // 数组作业中的子任务 ID
|
||||
}
|
||||
|
||||
// JobListResponse is the paginated response for job listings.
|
||||
|
||||
Reference in New Issue
Block a user