mirror of
https://github.com/ClusterCockpit/cc-backend
synced 2024-12-26 13:29:05 +01:00
Show JobId instead ID. Add output
This commit is contained in:
parent
d9e7a48e2f
commit
125f3cd254
@ -7,6 +7,7 @@ package scheduler
|
|||||||
import (
|
import (
|
||||||
"database/sql"
|
"database/sql"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
"fmt"
|
||||||
"strings"
|
"strings"
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
@ -38,17 +39,16 @@ type StopJobRequest struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (sd *SlurmNatsScheduler) startJob(req *schema.JobMeta) {
|
func (sd *SlurmNatsScheduler) startJob(req *schema.JobMeta) {
|
||||||
// dump job meta
|
fmt.Printf("DEBUG: %+v\n", *req)
|
||||||
// this is not working
|
|
||||||
// req := schema.JobMeta{BaseJob: schema.JobDefaults}
|
|
||||||
|
|
||||||
log.Printf("Server Name: %s - BaseJob ID: %v", req.BaseJob.Cluster, req.ID)
|
log.Printf("Server Name: %s - Job ID: %v", req.BaseJob.Cluster, req.BaseJob.JobID)
|
||||||
log.Printf("User: %s - Project: %s", req.BaseJob.User, req.BaseJob.Project)
|
log.Printf("User: %s - Project: %s", req.BaseJob.User, req.BaseJob.Project)
|
||||||
|
|
||||||
if req.State == "" {
|
if req.State == "" {
|
||||||
req.State = schema.JobStateRunning
|
req.State = schema.JobStateRunning
|
||||||
}
|
}
|
||||||
if err := importer.SanityChecks(&req.BaseJob); err != nil {
|
if err := importer.SanityChecks(&req.BaseJob); err != nil {
|
||||||
|
log.Errorf("Sanity checks failed: %s", err.Error())
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user