Removed futures dependency, migrated to tokio::sync::mpsc .

closed #45
This commit is contained in:
Ara Sadoyan
2026-06-30 12:27:49 +02:00
parent 874ce4fddb
commit 9a1e8fe149
8 changed files with 13 additions and 29 deletions

View File

@@ -1,16 +1,15 @@
use crate::utils::parceyaml::load_configuration;
use crate::utils::structs::Configuration;
use futures::channel::mpsc::Sender;
use futures::SinkExt;
use log::error;
use notify::event::ModifyKind;
use notify::{Config, Event, EventKind, RecommendedWatcher, RecursiveMode, Watcher};
use pingora::prelude::sleep;
use std::path::Path;
use std::time::{Duration, Instant};
use tokio::sync::mpsc::Sender;
use tokio::task;
pub async fn start(fp: String, mut toreturn: Sender<Configuration>) {
pub async fn start(fp: String, toreturn: Sender<Configuration>) {
sleep(Duration::from_millis(50)).await; // For having nice logs :-)
let file_path = fp.as_str();
let parent_dir = Path::new(file_path).parent().unwrap();