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

Закрито
igalic хоче злити 6 комітів з igalic/Plume:refactor/extract-searcher-with-dbpool в main

6 Коміти (main)

Автор SHA1 Повідомлення Дата
Mina Galić 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
4 роки тому
Mina Galić a5c81498b2
plume-models: fix test compilation 4 роки тому
Ana Gelez fefd7ef9b6
Wrap Searcher in an Arc only in main 4 роки тому
Ana Gelez 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).
4 роки тому
Ana Gelez b9514d5711
Avoid unwrapping, return an Error instead 4 роки тому
Mina Galić 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.
4 роки тому