File tree Expand file tree Collapse file tree 4 files changed +4
-7
lines changed
libs/orchestrator/scheduler Expand file tree Collapse file tree 4 files changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -377,11 +377,6 @@ func SetJobStatusForProject(c *gin.Context) {
377
377
c .JSON (http .StatusInternalServerError , gin.H {"error" : "Error merging PR with automerge option" })
378
378
}
379
379
380
- type BatchResponse struct {
381
- Status string
382
- JobPaylaods []models.DiggerJobSummary
383
- }
384
-
385
380
// return batch summary to client
386
381
res , err := batch .MapToJsonStruct ()
387
382
if err != nil {
Original file line number Diff line number Diff line change @@ -82,6 +82,7 @@ func (j *DiggerJob) MapToJsonStruct() interface{} {
82
82
return orchestrator_scheduler.SerializedJob {
83
83
DiggerJobId : j .DiggerJobId ,
84
84
Status : j .Status ,
85
+ JobString : j .SerializedJob ,
85
86
ProjectName : job .ProjectName ,
86
87
ResourcesCreated : j .DiggerJobSummary .ResourcesCreated ,
87
88
ResourcesUpdated : j .DiggerJobSummary .ResourcesUpdated ,
Original file line number Diff line number Diff line change @@ -677,10 +677,10 @@ func (db *Database) UpdateDiggerJob(job *DiggerJob) error {
677
677
678
678
func (db * Database ) GetDiggerJobsForBatch (batchId uuid.UUID ) ([]DiggerJob , error ) {
679
679
jobs := make ([]DiggerJob , 0 )
680
- joins := db .GormDB .Joins ("LEFT JOIN digger_job_parent_links ON digger_jobs.digger_job_id = digger_job_parent_links.digger_job_id" ). Preload ( "Batch" ). Preload ( "DiggerJobSummary" )
680
+ joins := db .GormDB .Joins ("LEFT JOIN digger_job_parent_links ON digger_jobs.digger_job_id = digger_job_parent_links.digger_job_id" )
681
681
682
682
var where * gorm.DB
683
- where = joins .Where ("digger_jobs.batch_id = ?" , batchId )
683
+ where = joins .Preload ( "Batch" ). Preload ( "DiggerJobSummary" ). Where ("digger_jobs.batch_id = ?" , batchId )
684
684
685
685
result := where .Find (& jobs )
686
686
if result .Error != nil {
Original file line number Diff line number Diff line change @@ -48,6 +48,7 @@ type SerializedJob struct {
48
48
DiggerJobId string `json:"digger_job_id"`
49
49
Status DiggerJobStatus `json:"status"`
50
50
ProjectName string `json:"project_name"`
51
+ JobString []byte `json:"job_string"`
51
52
ResourcesCreated uint `json:"resources_created"`
52
53
ResourcesDeleted uint `json:"resources_deleted"`
53
54
ResourcesUpdated uint `json:"resources_updated"`
You can’t perform that action at this time.
0 commit comments