From 432e06e801f0f90cb9dab609e5b92d434fc58390 Mon Sep 17 00:00:00 2001 From: Jan Eitzinger Date: Fri, 16 May 2025 17:19:56 +0200 Subject: [PATCH] Add GoString method for jobmeta --- pkg/schema/job.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkg/schema/job.go b/pkg/schema/job.go index 5e3110b..df901b4 100644 --- a/pkg/schema/job.go +++ b/pkg/schema/job.go @@ -145,7 +145,12 @@ const ( JobStateOutOfMemory JobState = "out_of_memory" ) -func (e *JobState) UnmarshalGQL(v interface{}) error { +func (j JobMeta) GoString() string { + return fmt.Sprintf("JobMeta{ID:%d, StartTime:%d, JobID:%v, BaseJob:%v}", + j.ID, j.StartTime, j.JobID, j.BaseJob) +} + +func (e *JobState) UnmarshalGQL(v any) error { str, ok := v.(string) if !ok { return fmt.Errorf("SCHEMA/JOB > enums must be strings")