feat(service): add task defaults, job status, and cluster helpers

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
dailz
2026-04-20 10:38:41 +08:00
parent f894e870ed
commit 166ca3092c
3 changed files with 151 additions and 9 deletions

View File

@@ -26,6 +26,8 @@ func derefInt32(i *int32) int32 {
return *i
}
func int32Ptr(i int32) *int32 { return &i }
func derefInt64(i *int64) int64 {
if i == nil {
return 0
@@ -33,6 +35,13 @@ func derefInt64(i *int64) int64 {
return *i
}
func derefInt32ToStr(i *int32) string {
if i == nil {
return ""
}
return strconv.FormatInt(int64(*i), 10)
}
func uint32NoValString(v *slurm.Uint32NoVal) string {
if v == nil {
return ""