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

api/jobs/update-usage: Process users in parallel and allow cancellation #2203

Merged
merged 3 commits into from
Jun 13, 2024

Conversation

victorges
Copy link
Member

What does this pull request do? Explain your changes. (required)
This improves the update-usage job by processing users in parallel (up to 10 at a time).

The job is currently taking ~70 minutes to run so I hope this would bring it under 10min.

Specific updates (required)

  • Respect SIGTERM from the job runtime
  • Paralelize user usage reporting
  • Fix console.log logs to logger

How did you test each of these updates (required)
yarn test

Does this pull request close any open issues?
Fixes issue noticed after jobs reply, not tracked to Linear.

Checklist

  • I have read the CONTRIBUTING document.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.

@victorges victorges requested a review from a team as a code owner June 11, 2024 17:16
Copy link

vercel bot commented Jun 11, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
livepeer-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 12, 2024 6:39pm

Copy link
Member

@gioelecerati gioelecerati left a comment

Choose a reason for hiding this comment

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

Ooooh thank you for doing this ❤️ lgtm - let's make sure that everything is getting reported correctly in staging and in dev stripe

@victorges victorges merged commit e3d9d0d into master Jun 13, 2024
8 checks passed
@victorges victorges deleted the vg/feat/faster-update-usage branch June 13, 2024 16:17
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