mirror of
https://gitea.0xace.cc/rust/github-release-bot.git
synced 2024-11-25 05:46:40 +00:00
cleanup
This commit is contained in:
parent
7936d88c57
commit
aa4f7e2afe
10
src/main.rs
10
src/main.rs
@ -30,13 +30,9 @@ impl Repo {
|
||||
let _res = github_get_latest_release(&self.owner, &self.repo).await;
|
||||
}
|
||||
|
||||
// fn print_result(&self) {
|
||||
// println!("{}, {}", self.owner, self.repo);
|
||||
// }
|
||||
}
|
||||
|
||||
#[derive(Clap)]
|
||||
// #[clap(version = "1.0")]
|
||||
struct Opts {
|
||||
/// Config file
|
||||
#[clap(long, default_value = "config.yaml")]
|
||||
@ -82,16 +78,14 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let _items = join_parallel(items.into_iter().map(|mut item| async {
|
||||
item.init().await;
|
||||
item
|
||||
}))
|
||||
.await;
|
||||
})).await;
|
||||
|
||||
loop {
|
||||
let items: Vec<_> = config.iter().map(|x| Repo { owner: x.owner.trim().to_string(), repo: x.repo.trim().to_string() }).collect();
|
||||
let _items = join_parallel(items.into_iter().map(|mut item| async {
|
||||
item.resolve().await;
|
||||
item
|
||||
}))
|
||||
.await;
|
||||
})).await;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user