mirror of
https://github.com/ClusterCockpit/cc-backend
synced 2024-12-25 04:49:05 +01:00
Remove obsolete check
Now handeled by DB UNIQUE constraint
This commit is contained in:
parent
7491ae9e3c
commit
f6c629c696
@ -6,7 +6,6 @@ package importer
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"database/sql"
|
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
@ -69,17 +68,18 @@ func HandleImportFlag(flag string) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// checkJobData(&jobData)
|
// checkJobData(&jobData)
|
||||||
// SanityChecks(&jobMeta.BaseJob)
|
|
||||||
jobMeta.MonitoringStatus = schema.MonitoringStatusArchivingSuccessful
|
jobMeta.MonitoringStatus = schema.MonitoringStatusArchivingSuccessful
|
||||||
if _, err = r.Find(&jobMeta.JobID, &jobMeta.Cluster, &jobMeta.StartTime); err != sql.ErrNoRows {
|
|
||||||
if err != nil {
|
|
||||||
log.Warn("Error while finding job in jobRepository")
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
return fmt.Errorf("REPOSITORY/INIT > a job with that jobId, cluster and startTime does already exist")
|
|
||||||
}
|
|
||||||
|
|
||||||
|
// if _, err = r.Find(&jobMeta.JobID, &jobMeta.Cluster, &jobMeta.StartTime); err != sql.ErrNoRows {
|
||||||
|
// if err != nil {
|
||||||
|
// log.Warn("Error while finding job in jobRepository")
|
||||||
|
// return err
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// return fmt.Errorf("REPOSITORY/INIT > a job with that jobId, cluster and startTime does already exist")
|
||||||
|
// }
|
||||||
|
//
|
||||||
job := schema.Job{
|
job := schema.Job{
|
||||||
BaseJob: jobMeta.BaseJob,
|
BaseJob: jobMeta.BaseJob,
|
||||||
StartTime: time.Unix(jobMeta.StartTime, 0),
|
StartTime: time.Unix(jobMeta.StartTime, 0),
|
||||||
|
Loading…
Reference in New Issue
Block a user