# HG changeset patch # User Sascha L. Teichmann # Date 1550487430 -3600 # Node ID c8cc875d271cf24c5a5f012153b44256e05c46df # Parent da6611071a58906250315194dc8b7683abc7b0ff Import config: Marshalling of so properties got lost somehow. diff -r da6611071a58 -r c8cc875d271c pkg/models/importbase.go --- a/pkg/models/importbase.go Mon Feb 18 11:22:31 2019 +0100 +++ b/pkg/models/importbase.go Mon Feb 18 11:57:10 2019 +0100 @@ -151,6 +151,29 @@ if qct.Due != nil { attrs.SetTime("due", qct.Due.Time) } + if qct.Cron != nil { + attrs.Set("cron", string(*qct.Cron)) + } + return nil +} + +func (qct *QueueConfigurationType) UnmarshalAttributes(attrs common.Attributes) error { + if err := qct.EmailType.UnmarshalAttributes(attrs); err != nil { + return err + } + if trys, found := attrs.Int("trys"); found { + qct.Trys = &trys + } + if duration, found := attrs.Duration("wait-retry"); found { + qct.WaitRetry = &ConfigDuration{duration} + } + if due, found := attrs.Time("due"); found { + qct.Due = &ConfigTime{due} + } + if cron, found := attrs.Get("cron"); found { + cs := CronSpec(cron) + qct.Cron = &cs + } return nil } diff -r da6611071a58 -r c8cc875d271c pkg/models/imports.go --- a/pkg/models/imports.go Mon Feb 18 11:22:31 2019 +0100 +++ b/pkg/models/imports.go Mon Feb 18 11:57:10 2019 +0100 @@ -104,11 +104,17 @@ ) func (cui *ConfigurableURLImport) MarshalAttributes(attrs common.Attributes) error { - return cui.URLType.MarshalAttributes(attrs) + if err := cui.URLType.MarshalAttributes(attrs); err != nil { + return err + } + return cui.QueueConfigurationType.MarshalAttributes(attrs) } func (cui *ConfigurableURLImport) UnmarshalAttributes(attrs common.Attributes) error { - return cui.URLType.UnmarshalAttributes(attrs) + if err := cui.URLType.UnmarshalAttributes(attrs); err != nil { + return err + } + return cui.QueueConfigurationType.UnmarshalAttributes(attrs) } func (wi *WFSImport) MarshalAttributes(attrs common.Attributes) error {