perf: skip already pushed check (#6164)

Co-authored-by: Livio Spring <livio.a@gmail.com>
This commit is contained in:
Elio Bischof 2023-07-11 12:10:37 +02:00 committed by GitHub
parent 14b8cf4894
commit 08f242e98d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -122,14 +122,6 @@ func (t *telemetryPusher) pushMilestones(event eventstore.Event) (*handler.State
func (t *telemetryPusher) pushMilestone(ctx context.Context, event *pseudo.ScheduledEvent, ms *query.Milestone) error {
ctx = authz.WithInstanceID(ctx, ms.InstanceID)
alreadyHandled, err := t.queries.IsAlreadyHandled(ctx, event, map[string]interface{}{"type": ms.Type.String()}, milestone.AggregateType, milestone.PushedEventType)
if err != nil {
return err
}
if alreadyHandled {
return nil
}
for _, endpoint := range t.cfg.Endpoints {
if err := types.SendJSON(
ctx,