Skip to content

Commit

Permalink
[core] Publish ODC partition state changes
Browse files Browse the repository at this point in the history
  • Loading branch information
teo committed Mar 21, 2024
1 parent d8785f0 commit e3a392f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions core/integration/odc/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -259,12 +259,16 @@ func (p *Plugin) queryPartitionStatus() {
Info("ODC Partition state changed")

payload := map[string]interface{}{
"odcStatus": &response,
"oldState": existingPartition.State,
"newState": partitionInfo.State,
"partitionId": partitionInfo.PartitionId.String(),
"ddsSessionId": partitionInfo.DdsSessionId,
"ddsSessionStatus": partitionInfo.DdsSessionStatus,
}
payloadJson, _ := json.Marshal(payload)

the.EventWriterWithTopic(TOPIC).WriteEvent(&pb.Ev_IntegratedServiceEvent{
Name: "odc.queryPartitionStatus",
Name: "odc.partitionStateChanged",
EnvironmentId: id.String(),
Payload: string(payloadJson[:]),
})
Expand Down

0 comments on commit e3a392f

Please sign in to comment.