mirror of
https://github.com/euzu/tuliprox.git
synced 2026-10-15 20:32:27 +02:00
SyncIOBridge caused tokio panic
This commit is contained in:
@@ -99,20 +99,6 @@ fn group_playlist_groups_by_cluster(playlist: Vec<PlaylistGroup>) -> (Vec<Playli
|
||||
(live, video, series)
|
||||
}
|
||||
|
||||
|
||||
// async fn get_categories_content(action: Result<(Option<PathBuf>, Option<String>), std::io::Error>) -> Option<String> {
|
||||
// if let Ok((Some(file_path), _content)) = action {
|
||||
// if let Ok(content) = tokio::fs::read_to_string(&file_path).await {
|
||||
// // TODO deserialize like sax parser
|
||||
// if let Ok(categories) = serde_json::from_str::<Vec<PlaylistXtreamCategory>>(&content) {
|
||||
// return serde_json::to_string(&categories).ok();
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// None
|
||||
// }
|
||||
|
||||
|
||||
async fn grouped_channels(
|
||||
cfg: &AppConfig,
|
||||
target: &ConfigTarget,
|
||||
|
||||
@@ -10,7 +10,7 @@ use crate::repository::playlist_repository::load_target_into_memory_cache;
|
||||
use crate::tools::lru_cache::LRUResourceCache;
|
||||
use crate::utils::request::create_client;
|
||||
use arc_swap::{ArcSwap, ArcSwapOption};
|
||||
use log::error;
|
||||
use log::{error, info};
|
||||
use reqwest::Client;
|
||||
use shared::error::TuliproxError;
|
||||
use shared::model::UserConnectionPermission;
|
||||
@@ -207,6 +207,7 @@ pub fn create_cache(config: &Config) -> Option<Arc<Mutex<LRUResourceCache>>> {
|
||||
});
|
||||
let cache_enabled = lru_cache.is_some();
|
||||
if cache_enabled {
|
||||
info!("Scanning cache");
|
||||
if let Some(res_cache) = lru_cache {
|
||||
let cache = Arc::new(Mutex::new(res_cache));
|
||||
let cache_scanner = Arc::clone(&cache);
|
||||
|
||||
Reference in New Issue
Block a user