Skip to content

Commit

Permalink
cleanup: remove unused team arg from registerLastStep
Browse files Browse the repository at this point in the history
  • Loading branch information
bretthoerner committed Mar 22, 2024
1 parent 3bacde5 commit 08e6605
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions plugin-server/src/worker/ingestion/event-pipeline/runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,14 @@ export class EventPipelineRunner {
drop_cause: 'disallowed',
})
.inc()
return this.registerLastStep('eventDisallowedStep', null, [event])
return this.registerLastStep('eventDisallowedStep', [event])
}
let result: EventPipelineResult
const eventWithTeam = await this.runStep(populateTeamDataStep, [this, event], event.team_id || -1)
if (eventWithTeam != null) {
result = await this.runEventPipelineSteps(eventWithTeam)
} else {
result = this.registerLastStep('populateTeamDataStep', null, [event])
result = this.registerLastStep('populateTeamDataStep', [event])
}
eventProcessedAndIngestedCounter.inc()
return result
Expand Down Expand Up @@ -120,7 +120,7 @@ export class EventPipelineRunner {
const processedEvent = await this.runStep(pluginsProcessEventStep, [this, event], event.team_id)

if (processedEvent == null) {
return this.registerLastStep('pluginsProcessEventStep', event.team_id, [event])
return this.registerLastStep('pluginsProcessEventStep', [event])
}
const [normalizedEvent, person] = await this.runStep(processPersonsStep, [this, processedEvent], event.team_id)

Expand All @@ -132,15 +132,10 @@ export class EventPipelineRunner {
event.team_id
)

return this.registerLastStep('createEventStep', event.team_id, [rawClickhouseEvent, person], [eventAck])
return this.registerLastStep('createEventStep', [rawClickhouseEvent, person], [eventAck])
}

registerLastStep(
stepName: string,
teamId: number | null,
args: any[],
promises?: Array<Promise<void>>
): EventPipelineResult {
registerLastStep(stepName: string, args: any[], promises?: Array<Promise<void>>): EventPipelineResult {
pipelineLastStepCounter.labels(stepName).inc()
return { promises: promises, lastStep: stepName, args }
}
Expand Down

0 comments on commit 08e6605

Please sign in to comment.