From f6c629c696ec8f1d41778f5afa0a885e666a8760 Mon Sep 17 00:00:00 2001 From: Jan Eitzinger Date: Thu, 4 May 2023 18:14:46 +0200 Subject: [PATCH] Remove obsolete check Now handeled by DB UNIQUE constraint --- internal/importer/handleImport.go | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/internal/importer/handleImport.go b/internal/importer/handleImport.go index a9ddc9f..5679d53 100644 --- a/internal/importer/handleImport.go +++ b/internal/importer/handleImport.go @@ -6,7 +6,6 @@ package importer import ( "bytes" - "database/sql" "encoding/json" "fmt" "os" @@ -69,17 +68,18 @@ func HandleImportFlag(flag string) error { } // checkJobData(&jobData) - // SanityChecks(&jobMeta.BaseJob) + 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{ BaseJob: jobMeta.BaseJob, StartTime: time.Unix(jobMeta.StartTime, 0),