Skip to content

fix: blocking when creating opengraph images #33197

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 5, 2025
Merged

Conversation

aspicer
Copy link
Contributor

@aspicer aspicer commented Jun 5, 2025

moving to blocking exports was also causing the creation of opengraph images to block, which was causing updates to the /sharing api endpoint to take forever.

add an async override and enable it on that path

@aspicer aspicer requested a review from a team June 5, 2025 07:03
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

Fixes performance bottleneck in OpenGraph image generation by adding force_async parameter to bypass blocking exports. The change ensures OpenGraph image creation remains asynchronous, preventing slowdowns in the /sharing API endpoint.

  • Added force_async=True parameter to synthetic_create method in posthog/api/exports.py to override blocking behavior
  • Optimization ensures OpenGraph image generation doesn't get affected by 'blocking-exports' feature flag
  • Performance improvement for /sharing API endpoint by preventing synchronous blocking

1 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings | Greptile

@aspicer aspicer enabled auto-merge (squash) June 5, 2025 07:04
@aspicer aspicer merged commit ff9fe05 into master Jun 5, 2025
96 checks passed
@aspicer aspicer deleted the aspicer/fix_blocking branch June 5, 2025 07:41
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