fix bug where meta files where not auto-created upon starting + fix bug where meta json files were actually binary + improved access control to database instances
This commit is contained in:
@@ -76,9 +76,12 @@ async fn main() {
|
||||
// new server
|
||||
let mut server = server::Server::new(option).await;
|
||||
|
||||
// Initialize the default database storage
|
||||
// Initialize the default database storage (creates 0.db)
|
||||
let _ = server.current_storage();
|
||||
|
||||
// Ensure default meta for DB 0 exists (public by default if missing)
|
||||
let _ = herodb::rpc::RpcServerImpl::load_meta_static(&server.option.dir, 0).await;
|
||||
|
||||
// Add a small delay to ensure the port is ready
|
||||
tokio::time::sleep(std::time::Duration::from_millis(100)).await;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user