comparison pkg/controllers/importconfig.go @ 1708:49e047c2106e

Imports: Made imports re-runnable if they fail.
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Tue, 08 Jan 2019 13:35:44 +0100
parents 897d4d8316ad
children 3adb834ed55e
comparison
equal deleted inserted replaced
1707:74b66527ae81 1708:49e047c2106e
23 "strconv" 23 "strconv"
24 24
25 "github.com/gorilla/mux" 25 "github.com/gorilla/mux"
26 26
27 "gemma.intevation.de/gemma/pkg/auth" 27 "gemma.intevation.de/gemma/pkg/auth"
28 "gemma.intevation.de/gemma/pkg/common"
28 "gemma.intevation.de/gemma/pkg/imports" 29 "gemma.intevation.de/gemma/pkg/imports"
29 "gemma.intevation.de/gemma/pkg/scheduler" 30 "gemma.intevation.de/gemma/pkg/scheduler"
30 ) 31 )
31 32
32 const ( 33 const (
299 300
300 func storeConfigAttributes( 301 func storeConfigAttributes(
301 ctx context.Context, 302 ctx context.Context,
302 tx *sql.Tx, 303 tx *sql.Tx,
303 id int64, 304 id int64,
304 attrs imports.ConfigAttributes, 305 attrs common.Attributes,
305 ) error { 306 ) error {
306 if len(attrs) == 0 { 307 if len(attrs) == 0 {
307 return nil 308 return nil
308 } 309 }
309 attrStmt, err := tx.PrepareContext(ctx, insertImportConfigurationAttributeSQL) 310 attrStmt, err := tx.PrepareContext(ctx, insertImportConfigurationAttributeSQL)