pub fn sync_in_background_reviews() {
    POOL.spawn(move || {
        let ns_started = crate::utils_mod::ns_start("sync_in_background_reviews");
        let vec = unwrap!(crate::crev_mod::crev_list_my_reviews(&None));
        for x in vec.iter() {
            let item = crate::utils_mod::from_crev_to_item(x);
            let crate_name_version = &join_crate_version(&item.crate_name, &item.crate_version);
            if crate::db_sled_mod::db_review_mod::exists(crate_name_version) {
                // check the date
                let y = unwrap!(unwrap!(crate::db_sled_mod::db_review_mod::read(crate_name_version)));
                if y.date != item.date {
                    unwrap!(crate::db_sled_mod::db_review_mod::insert(crate_name_version, &item));
                }
            } else {
                unwrap!(crate::db_sled_mod::db_review_mod::insert(crate_name_version, &item));
            }
        }
        crate::utils_mod::ns_print_ms("sync_in_background_reviews", ns_started);
    });
}
/// working with crev data looks slow.
/// I will sync in background with fast sled database and work from there.
working with crev data looks slow.
I will sync in background with fast sled database and work from there.
working with crev data looks slow . I will sync in background with fast sled database and work from there .
pub fn sync_in_background_reviews() {
    POOL.spawn(move || {
        let ns_started = crate::utils_mod::ns_start("sync_in_background_reviews");
        let vec = unwrap!(crate::crev_mod::crev_list_my_reviews(&None));
        for x in vec.iter() {
            let item = crate::utils_mod::from_crev_to_item(x);
            let crate_name_version = &join_crate_version(&item.crate_name, &item.crate_version);
            if crate::db_sled_mod::db_review_mod::exists(crate_name_version) {
                // check the date
                let y = unwrap!(unwrap!(crate::db_sled_mod::db_review_mod::read(crate_name_version)));
                if y.date != item.date {
                    unwrap!(crate::db_sled_mod::db_review_mod::insert(crate_name_version, &item));
                }
            } else {
                unwrap!(crate::db_sled_mod::db_review_mod::insert(crate_name_version, &item));
            }
        }
        crate::utils_mod::ns_print_ms("sync_in_background_reviews", ns_started);
    });
}
pub fn sync_in_background_reviews ( ) { POOL . spawn ( move | | { let ns_started = crate :: utils_mod :: ns_start ( " " ) ; let vec = unwrap ! ( crate crev_mod crev_list_my_reviews ( None ) ) ; for x in vec . iter ( ) { let item = crate :: utils_mod :: from_crev_to_item ( x ) ; let crate_name_version = & join_crate_version ( & item . crate_name , & item . crate_version ) ; if crate :: db_sled_mod :: db_review_mod :: exists ( crate_name_version ) { // check the date let y = unwrap ! ( unwrap ( crate db_sled_mod db_review_mod read ( crate_name_version ) ) ) ; if y . date != item . date { unwrap ! ( crate db_sled_mod db_review_mod insert ( crate_name_version item ) ) ; } } else { unwrap ! ( crate db_sled_mod db_review_mod insert ( crate_name_version item ) ) ; } } crate :: utils_mod :: ns_print_ms ( " " , ns_started ) ; } ) ; }
working with crev data looks slow.
working with crev data looks slow .