Skip to content

Commit

Permalink
debug delegation event
Browse files Browse the repository at this point in the history
  • Loading branch information
vicente87 committed Dec 10, 2024
1 parent 1ae071f commit b87622c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions pkg/resourcemanager/delegate.go
Original file line number Diff line number Diff line change
Expand Up @@ -940,7 +940,7 @@ func createParameters(results [][]float64, duration time.Duration, clusterStatus
}

func eventBuild(event string, storage_provider string) []byte {
fmt.Println("eventBuild Function.")
fmt.Println("eventBuild Function...")
var eventMap map[string]interface{}
err := json.Unmarshal([]byte(event), &eventMap)
if err != nil {
Expand All @@ -952,9 +952,10 @@ func eventBuild(event string, storage_provider string) []byte {
if storage, exists := eventMap["storage_provider"]; exists {
fmt.Println("The 'storage_provider' field exists in the event ")
eventValue := eventMap["event"]
eventString, _ := json.Marshal(eventValue)
//eventString, _ := json.Marshal(eventValue)

delegatedEvent1 := WrapEvent(storage.(string), string(eventString))
//delegatedEvent1 := WrapEvent(storage.(string), string(eventString))
delegatedEvent1 := WrapEvent(storage.(string), eventValue.(string))
fmt.Println("New DelegatedEvent:", delegatedEvent1)

k, err1 := json.Marshal(delegatedEvent1)
Expand Down

0 comments on commit b87622c

Please sign in to comment.