Skip to content

fastly: Use async reqwest client #7475

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 2 commits into from
Nov 8, 2023
Merged

Conversation

Turbo87
Copy link
Member

@Turbo87 Turbo87 commented Nov 8, 2023

This PR refactors our basic Fastly client to use async fns and an async reqwest HTTP client.

This will should us to eventually write async test cases. This is currently prevented by the reqwest::blocking::Client constructor panicking if executed from within an async context.

The background jobs are not async functions yet, but the DumpDb job which uses the Fastly client already has an async runtime to upload the database dump to S3 and invalidate CloudFront, so it is relatively straight-forward to integrate there.

@Turbo87 Turbo87 added C-internal 🔧 Category: Nonessential work that would make the codebase more consistent or clear A-backend ⚙️ labels Nov 8, 2023
Copy link
Member

@0xPoe 0xPoe left a comment

Choose a reason for hiding this comment

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

Looks good to me. Thanks!

@Turbo87 Turbo87 merged commit 06cdfbf into rust-lang:main Nov 8, 2023
@Turbo87 Turbo87 deleted the async-fastly branch November 8, 2023 12:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-backend ⚙️ C-internal 🔧 Category: Nonessential work that would make the codebase more consistent or clear
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants