Skip to content

Commit

Permalink
Added kafka message to DCS for any detector change for any detector
Browse files Browse the repository at this point in the history
  • Loading branch information
Michal Tichák committed Sep 25, 2024
1 parent 69b64e5 commit 277d7db
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions core/integration/dcs/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -985,6 +985,23 @@ func (p *Plugin) CallStack(data interface{}) (stack map[string]interface{}) {
WithField("partition", envId).
WithField("level", infologger.IL_Devel).
Info("ALIECS PFR operation : processing DCS PFR for ")

ecsDet := dcsToEcsDetector(dcsEvent.GetDetector())
detPayload := map[string]interface{}{}
_ = copier.Copy(&detPayload, payload)
detPayload["detector"] = ecsDet
detPayload["dcsEvent"] = dcsEvent
detPayloadJson, _ := json.Marshal(detPayload)

the.EventWriterWithTopic(TOPIC).WriteEvent(&pb.Ev_IntegratedServiceEvent{
Name: call.GetName(),
OperationName: call.Func,
OperationStatus: pb.OpStatus_ONGOING,
OperationStep: "perform DCS call: PrepareForRun",
OperationStepStatus: pb.OpStatus_ONGOING,
EnvironmentId: envId,
Payload: string(detPayloadJson[:]),
})
}

}
Expand Down

0 comments on commit 277d7db

Please sign in to comment.