plume-model: refactor Searcher to have its own DbPool #809

已關閉
igalic wants to merge 6 commit from igalic/Plume:refactor/extract-searcher-with-dbpool into main

6 commit

作者 SHA1 備註 提交日期
8f0fe5aaf9
remove Searcher from PlumeRocket and add a FromRequest to retrieve it
this will not compile, so now it's time to fix the rest
2020-07-25 10:03:22 +02:00
a5c81498b2
plume-models: fix test compilation 2020-07-24 22:12:05 +02:00
fefd7ef9b6
Wrap Searcher in an Arc only in main 2020-07-24 22:12:05 +02:00
a52b8393a2
Introduce Searcher::new
This function does what was previously done in main:
create a search index, and try to recover for errors
if possible.

This commit also fixes plume-cli to use the new Searcher
API (that depends on a DbPool, not on a single Connection).
2020-07-24 22:12:04 +02:00
b9514d5711
Avoid unwrapping, return an Error instead 2020-07-24 22:12:03 +02:00
56689af1ba
plume-model: refactor Searcher to have its own DbPool
this way, we don't need to pass along a conn into the function.
This should make splitting PlumeRocket up into its components a little
easier. This PR is another attempt at fixing #799.
2020-07-24 22:12:02 +02:00