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

fix(billing): reconciliation email parallelization #2530

Merged
merged 2 commits into from
Jul 26, 2023

Conversation

Cosmin-Parvulescu
Copy link
Contributor

Description

Locally, the worker would lose connection with the loop. Parallelizing it seems to fix that.

Testing

  • Ran reconciliation before change -> 500, lose connection
  • Ran reconciliation after change -> 200

Checklist

  • I have read the CONTRIBUTING guidelines
  • I have tested my code (manually and/or automated if applicable)
  • I have updated the documentation (if necessary)

@Cosmin-Parvulescu Cosmin-Parvulescu added the bug Indicates an unexpected problem or unintended behavior label Jul 21, 2023
@Cosmin-Parvulescu Cosmin-Parvulescu self-assigned this Jul 21, 2023
@Cosmin-Parvulescu Cosmin-Parvulescu force-pushed the fix/billing/reconcilliation-email-parallelization branch from 3dd769e to 0d50d34 Compare July 21, 2023 11:26
@Cosmin-Parvulescu Cosmin-Parvulescu force-pushed the fix/billing/reconcilliation-email-parallelization branch from 0d50d34 to 6105d9e Compare July 25, 2023 09:42
input.apps
.filter((a) => Boolean(a.devEmail))
.map((app) => {
ctx.emailClient.sendReconciliationNotification.query({
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we make this a batch interface instead of parallelizing this? Also, make the proc it a mutation instead of a query, so the batch payload go in the body and not the query params.

@Cosmin-Parvulescu Cosmin-Parvulescu force-pushed the fix/billing/reconcilliation-email-parallelization branch from 6105d9e to ac859d1 Compare July 26, 2023 08:39
@betimshahini betimshahini merged commit dca9e25 into main Jul 26, 2023
@betimshahini betimshahini deleted the fix/billing/reconcilliation-email-parallelization branch July 26, 2023 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates an unexpected problem or unintended behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants