fix(katana): improve the image analyzing process
Zamn, decreasing contrast and also copying Nori code.
This commit is contained in:
@ -1,12 +1,12 @@
|
||||
use crate::database;
|
||||
use crate::structs::Character;
|
||||
use mongodb::Collection;
|
||||
use std::sync::OnceLock;
|
||||
use std::time::{SystemTime, UNIX_EPOCH};
|
||||
use tokio::sync::OnceCell;
|
||||
use tokio::task;
|
||||
use tracing::trace;
|
||||
|
||||
pub static KATANA: OnceLock<Collection<Character>> = OnceLock::new();
|
||||
pub static KATANA: OnceCell<Collection<Character>> = OnceCell::const_new();
|
||||
|
||||
///
|
||||
/// Initialize the "katana" collection in MongoDB
|
||||
|
||||
@ -4,11 +4,11 @@ use mongodb::bson::doc;
|
||||
use mongodb::options::ClientOptions;
|
||||
use mongodb::{Client, Database};
|
||||
use std::env;
|
||||
use std::sync::OnceLock;
|
||||
use tokio::sync::OnceCell;
|
||||
use tracing::info;
|
||||
|
||||
static MONGO_CLIENT: OnceLock<Client> = OnceLock::new();
|
||||
static MONGO_DATABASE: OnceLock<Database> = OnceLock::new();
|
||||
static MONGO_CLIENT: OnceCell<Client> = OnceCell::const_new();
|
||||
static MONGO_DATABASE: OnceCell<Database> = OnceCell::const_new();
|
||||
|
||||
pub async fn init() {
|
||||
let mut options =
|
||||
|
||||
Reference in New Issue
Block a user