fixup! wip: refactor: API

This commit is contained in:
Rob Watson 2025-05-11 06:15:20 +02:00
parent 977b6fe7d7
commit d0d96dd1d9

View File

@ -64,14 +64,15 @@ func (a *App) Run(ctx context.Context) error {
return fmt.Errorf("receive envelope: %w", recErr)
}
evt := envelope.GetEvent()
if evt == nil {
pbEvt := envelope.GetEvent()
if pbEvt == nil {
a.logger.Error("Received envelope without event")
continue
}
a.logger.Debug("Received event")
a.bus.Send(protocol.EventFromProto(evt))
evt := protocol.EventFromProto(pbEvt)
a.logger.Debug("Received event from gRPC stream", "event", evt)
a.bus.Send(evt)
}
})