Skip to content

fix: cascade charge updates in batches #3861

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

Merged
merged 1 commit into from
Jun 25, 2025
Merged

Conversation

lovrocolic
Copy link
Collaborator

Context

Lago client has issues when passing updates to 30k child charges.

Description

Instead of using one job to handle all children charges, this PR creates batches of 100 records where one batch is processed in one background job.

Having individual jobs for each child charge also didn't work since too many jobs could be scheduled at the same time and it can lead to OOM issues with redis, depending on the load at that particular moment.

@lovrocolic lovrocolic merged commit 48ea7eb into main Jun 25, 2025
14 checks passed
@lovrocolic lovrocolic deleted the misc-improve-cascade branch June 25, 2025 10:33
diegocharles pushed a commit that referenced this pull request Jun 30, 2025
## Context

Lago client has issues when passing updates to 30k child charges.

## Description

Instead of using one job to handle all children charges, this PR creates
batches of 100 records where one batch is processed in one background
job.

Having individual jobs for each child charge also didn't work since too
many jobs could be scheduled at the same time and it can lead to OOM
issues with redis, depending on the load at that particular moment.
diegocharles pushed a commit that referenced this pull request Jul 11, 2025
## Context

Lago client has issues when passing updates to 30k child charges.

## Description

Instead of using one job to handle all children charges, this PR creates
batches of 100 records where one batch is processed in one background
job.

Having individual jobs for each child charge also didn't work since too
many jobs could be scheduled at the same time and it can lead to OOM
issues with redis, depending on the load at that particular moment.
diegocharles pushed a commit that referenced this pull request Jul 11, 2025
Lago client has issues when passing updates to 30k child charges.

Instead of using one job to handle all children charges, this PR creates
batches of 100 records where one batch is processed in one background
job.

Having individual jobs for each child charge also didn't work since too
many jobs could be scheduled at the same time and it can lead to OOM
issues with redis, depending on the load at that particular moment.
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