-
Notifications
You must be signed in to change notification settings - Fork 649
worker: Replace r2d2
with deadpool
#8385
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
Conversation
1f55578
to
e9b0c9d
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #8385 +/- ##
==========================================
- Coverage 87.64% 87.62% -0.03%
==========================================
Files 272 272
Lines 26342 26333 -9
==========================================
- Hits 23087 23073 -14
- Misses 3255 3260 +5 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
A couple of non-blocking notes, but nothing substantive.
let already_processed = conn | ||
.interact(move |conn| already_processed_inner(path, conn)) | ||
.await | ||
.map_err(|err| anyhow!(err.to_string()))??; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it worth us providing a trait to wrap this pattern, since it's coming up in every job?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you mean something like .interact_anyhow(...)
?
This PR ports all of our background worker jobs to use the async database connection pool (based on the
deadpool
crate) instead ofr2d2
(which does not supportdiesel-async
).This was initially causing failing and flaky tests, but those issues got resolved by: