pruning
This commit is contained in:
parent
2ed83084a7
commit
48b91c5e19
|
@ -47,7 +47,6 @@ impl ConfigWatcher {
|
|||
let config_path = PathBuf::from(path);
|
||||
|
||||
let handle = tokio::task::spawn(async move {
|
||||
log::warn!("from task");
|
||||
loop {
|
||||
match rx.recv().await {
|
||||
Some(Ok(_event)) => {
|
||||
|
|
|
@ -51,10 +51,6 @@ async fn main() {
|
|||
.init();
|
||||
|
||||
let args = Args::parse();
|
||||
let auth_path = args.config_dir.join("auth");
|
||||
let config_path = args.config_dir.join("config.json");
|
||||
let (config, _config_watcher) = config::init_config(config_path);
|
||||
config::CONFIG.get_or_init(|| RwLock::new(config));
|
||||
let _recorder = metrics_prometheus::install();
|
||||
|
||||
match args.command {
|
||||
|
@ -65,6 +61,10 @@ async fn main() {
|
|||
);
|
||||
}
|
||||
Commands::Watch => {
|
||||
let auth_path = args.config_dir.join("auth");
|
||||
let config_path = args.config_dir.join("config.json");
|
||||
let (config, _config_watcher) = config::init_config(config_path);
|
||||
config::CONFIG.get_or_init(|| RwLock::new(config));
|
||||
if let Some(mut interface) = TeslaInterface::load(auth_path)
|
||||
.await
|
||||
.some_or_print_with("loading tesla interface")
|
||||
|
|
Loading…
Reference in a new issue