Skip to content

Commit

Permalink
fix default publisher type
Browse files Browse the repository at this point in the history
  • Loading branch information
frrist committed Oct 2, 2024
1 parent a5004bb commit 6ac4f47
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions pkg/config/types/jobdefaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,21 @@ type DefaultPublisherConfig struct {
Type string `json:"Type" yaml:"Type,omitempty"`

// Params specifies the publisher configuration data.
Params map[string]interface{} `json:"Params,omitempty" yaml:"Params,omitempty"`
Params map[string]string `json:"Params,omitempty" yaml:"Params,omitempty"`
}

func (d DefaultPublisherConfig) ToSpecConfig() models.SpecConfig {
return models.SpecConfig{
sc := models.SpecConfig{
Type: d.Type,
Params: d.Params,
Params: make(map[string]interface{}),
}

for k, v := range d.Params {
sc.Params[k] = v
}

sc.Normalize()
return sc
}

type TaskTimeoutConfig struct {
Expand Down

0 comments on commit 6ac4f47

Please sign in to comment.