mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-12 11:04:25 +00:00
perf: skip already pushed check (#6164)
Co-authored-by: Livio Spring <livio.a@gmail.com>
This commit is contained in:
parent
14b8cf4894
commit
08f242e98d
@ -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 {
|
func (t *telemetryPusher) pushMilestone(ctx context.Context, event *pseudo.ScheduledEvent, ms *query.Milestone) error {
|
||||||
ctx = authz.WithInstanceID(ctx, ms.InstanceID)
|
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 {
|
for _, endpoint := range t.cfg.Endpoints {
|
||||||
if err := types.SendJSON(
|
if err := types.SendJSON(
|
||||||
ctx,
|
ctx,
|
||||||
|
Loading…
Reference in New Issue
Block a user