fix: don't block other command when database is opened
This commit is contained in:
@@ -44,9 +44,6 @@ static EARLY_QUIT: AtomicBool = AtomicBool::new(false);
|
||||
async fn main() -> Result<(), Box<dyn snafu::Error>> {
|
||||
nyquest_preset::register();
|
||||
|
||||
#[cfg(feature = "fetchall")]
|
||||
let _ = cache::init_db();
|
||||
|
||||
let logger = spdlog::default_logger().fork_with(|log| {
|
||||
log.set_level_filter(MoreSevereEqual(if cfg!(debug_assertions) {
|
||||
Level::Debug
|
||||
|
||||
@@ -89,6 +89,8 @@ where
|
||||
A::Payload: From<u32>,
|
||||
A::Response: Encode + for<'a> BorrowDecode<'a, ()> + HasUid,
|
||||
{
|
||||
let _ = cache::init_db();
|
||||
|
||||
let user_ids = user_ids.into();
|
||||
let read = cache::read_txn()?;
|
||||
let write = cache::write_txn()?;
|
||||
|
||||
Reference in New Issue
Block a user