# HG changeset patch # User Sascha L. Teichmann # Date 1547722726 -3600 # Node ID 5996b50d154a106c6497dfcacb1ce2d2f5fb1ffa # Parent bbd653a43a6abc6a88a5f1a1abf433ef34d07398 Fairway dimension import: Added missing scheduled configuration. diff -r bbd653a43a6a -r 5996b50d154a pkg/imports/scheduled.go --- a/pkg/imports/scheduled.go Thu Jan 17 11:45:33 2019 +0100 +++ b/pkg/imports/scheduled.go Thu Jan 17 11:58:46 2019 +0100 @@ -88,6 +88,49 @@ }, nil }, + FDJobKind: func(cfg *IDConfig) (interface{}, error) { + log.Println("info: schedule 'fd' import") + ft, found := cfg.Attributes.Get("feature-type") + if !found { + return nil, errors.New("cannot find 'feature-type' attribute") + } + sb, found := cfg.Attributes.Get("sort-by") + if !found { + return nil, errors.New("cannot find 'sort-by' attribute") + } + los, found := cfg.Attributes.Int("los") + if !found { + return nil, errors.New("cannot find 'los' attribute") + } + minWidth, found := cfg.Attributes.Int("min-width") + if !found { + return nil, errors.New("cannot find 'min-width' attribute") + } + maxWidth, found := cfg.Attributes.Int("max-width") + if !found { + return nil, errors.New("cannot find 'max-width' attribute") + } + depth, found := cfg.Attributes.Int("depth") + if !found { + return nil, errors.New("cannot find 'depth' attribute") + } + sourceOrganization, found := cfg.Attributes.Get("source-organization") + if !found { + return nil, errors.New("cannot find 'source-organization' attribute") + } + + return &FairwayDimension{ + URL: *cfg.URL, + FeatureType: ft, + SortBy: sb, + LOS: los, + MinWidth: minWidth, + MaxWidth: maxWidth, + Depth: depth, + SourceOrganization: sourceOrganization, + }, nil + }, + WGJobKind: func(cfg *IDConfig) (interface{}, error) { log.Println("info: schedule 'wg' import") username, _ := cfg.Attributes.Get("username")