Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: refactor webhooks groupIntoBatches #17395

Merged
merged 2 commits into from
Sep 13, 2023

Conversation

tiina303
Copy link
Contributor

Problem

Not sure why we get test failures in #17186 so this is part 1 of it

Changes

👉 Stay up-to-date with PostHog coding conventions for a smoother review.

How did you test this code?

@tiina303 tiina303 requested a review from a team September 12, 2023 13:57
@tiina303 tiina303 force-pushed the webhooks-group-into-batches-general branch from 8485263 to fe55576 Compare September 12, 2023 13:59
Comment on lines 72 to 74
const batchesWithOffsets = groupIntoBatchesByUsage(batch.messages, concurrency, (teamId) =>
actionMatcher.hasWebhooks(teamId)
)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: you might be able to get away with passing the function ref itself? Would need to confirm it compiles fine

Suggested change
const batchesWithOffsets = groupIntoBatchesByUsage(batch.messages, concurrency, (teamId) =>
actionMatcher.hasWebhooks(teamId)
)
const batchesWithOffsets = groupIntoBatchesByUsage(batch.messages, concurrency, actionMatcher.hasWebhooks)

@tiina303 tiina303 merged commit a75f09d into master Sep 13, 2023
@tiina303 tiina303 deleted the webhooks-group-into-batches-general branch September 13, 2023 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants