group config files refactored to groups.d and subfolders, WIP common config file
This commit is contained in:
+4
-5
@@ -36,7 +36,7 @@ async fn main() -> anyhow::Result<()> {
|
||||
.short("c")
|
||||
.long("config")
|
||||
.takes_value(true)
|
||||
.help("set custom storage file, defaults to groups.json"),
|
||||
.help("set custom config directory, defaults to groups.d"),
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("auth")
|
||||
@@ -75,9 +75,8 @@ async fn main() -> anyhow::Result<()> {
|
||||
.filter_module("reqwest", LevelFilter::Warn)
|
||||
.init();
|
||||
|
||||
let store = store::ConfigStore::new(StoreOptions {
|
||||
store_path: args.value_of("config").unwrap_or("groups.json").to_string(),
|
||||
save_pretty: true,
|
||||
let store = store::ConfigStore::load_from_fs(StoreOptions {
|
||||
store_dir: args.value_of("config").unwrap_or(".").to_string(),
|
||||
})
|
||||
.await?;
|
||||
|
||||
@@ -112,7 +111,7 @@ async fn main() -> anyhow::Result<()> {
|
||||
}
|
||||
|
||||
// Start
|
||||
let groups = store.spawn_groups().await;
|
||||
let groups = store.spawn_groups().await?;
|
||||
|
||||
let mut handles = vec![];
|
||||
for mut g in groups {
|
||||
|
||||
Reference in New Issue
Block a user