fix: proper executor shutdown in querier
This is not a huge issue but might drain resources like file descriptors during tests. The dedicated exuector also logs a warning.pull/24376/head
parent
d829db6e5d
commit
f75d3b1f5d
|
@ -134,6 +134,11 @@ impl QuerierDatabase {
|
|||
.await
|
||||
.expect("retry forever")
|
||||
}
|
||||
|
||||
/// Executor
|
||||
pub(crate) fn exec(&self) -> &Executor {
|
||||
&self.exec
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
|
|
|
@ -90,10 +90,12 @@ impl QuerierHandler for QuerierHandlerImpl {
|
|||
}
|
||||
|
||||
self.shutdown.cancelled().await;
|
||||
self.database.exec().join().await;
|
||||
}
|
||||
|
||||
fn shutdown(&self) {
|
||||
self.shutdown.cancel();
|
||||
self.database.exec().shutdown();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue