-
Notifications
You must be signed in to change notification settings - Fork 125
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
Add workers middleware and reengineer diesel middleware to make use of it #227
Conversation
This is private internal API for the workers middleware, which executes a function on the thread pool and returns the result along with the `State`.
Ah, needs a rebase to work with Gotham |
Codecov Report
@@ Coverage Diff @@
## master #227 +/- ##
==========================================
+ Coverage 79.1% 82.31% +3.21%
==========================================
Files 83 36 -47
Lines 3963 1674 -2289
==========================================
- Hits 3135 1378 -1757
+ Misses 828 296 -532
Continue to review full report at Codecov.
|
@smangelsdorf by any chance, do you want to finish this up? I think the workers middleware might be a good thing to ship alongside |
Sure, will do. I kept it separate while it was an experiment but I'm happy to move it into the main Gotham codebase. |
Done. Something's amiss with the |
@smangelsdorf, this happens because of my patches to run Clippy from Travis. #257 should fix this. |
@im-0: Thanks, that sorted it 👍 |
I still plan to sort out the reduced coverage and the new merge conflict, just haven't got to it yet. |
The changes here aren't compatible anymore with the Recent releases of Rust may also allow some better refactoring, especially |
@smangelsdorf noted - I'll take a look and it and see if I can get your work into master, to avoid having you wasted your time |
The time is a sunk cost at this point, so don't worry about wasting it 😉 Hopefully some percentage of this is still useful in the new world of Tokio/Futures/Hyper, but if it's easier to throw it out and redo it differently I won't take it to heart. |
@whitfin - I'm interested in seeing if I can resurrect this. I don't want to double up however, if you've already got far with it. |
The best (read: laziest) way to describe this PR is by pointing at the documentation for the "workers" and "diesel" middleware as written for this PR (mostly the rustdoc).
Ref #210