server: move notmuch refresh out of tantivy cfg block for refresh
This commit is contained in:
parent
b9aaf87dc2
commit
d7214f4f29
@ -583,12 +583,12 @@ impl Mutation {
|
||||
#[instrument(skip_all)]
|
||||
async fn refresh<'ctx>(&self, ctx: &Context<'ctx>) -> Result<bool, Error> {
|
||||
let nm = ctx.data_unchecked::<Notmuch>();
|
||||
info!("{}", String::from_utf8_lossy(&nm.new()?));
|
||||
#[cfg(feature = "tantivy")]
|
||||
{
|
||||
let tantivy = ctx.data_unchecked::<TantivyConnection>();
|
||||
let pool = ctx.data_unchecked::<PgPool>();
|
||||
// TODO: parallelize
|
||||
info!("{}", String::from_utf8_lossy(&nm.new()?));
|
||||
tantivy.refresh(pool).await?;
|
||||
}
|
||||
Ok(true)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user