fixup! wip: refactor: API
This commit is contained in:
parent
977b6fe7d7
commit
d0d96dd1d9
@ -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)
|
||||
}
|
||||
})
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user