mirror of
https://gitea.0xace.cc/rust/github-release-bot.git
synced 2024-11-25 13:56:39 +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;
|
let _res = github_get_latest_release(&self.owner, &self.repo).await;
|
||||||
}
|
}
|
||||||
|
|
||||||
// fn print_result(&self) {
|
|
||||||
// println!("{}, {}", self.owner, self.repo);
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clap)]
|
#[derive(Clap)]
|
||||||
// #[clap(version = "1.0")]
|
|
||||||
struct Opts {
|
struct Opts {
|
||||||
/// Config file
|
/// Config file
|
||||||
#[clap(long, default_value = "config.yaml")]
|
#[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 {
|
let _items = join_parallel(items.into_iter().map(|mut item| async {
|
||||||
item.init().await;
|
item.init().await;
|
||||||
item
|
item
|
||||||
}))
|
})).await;
|
||||||
.await;
|
|
||||||
|
|
||||||
loop {
|
loop {
|
||||||
let items: Vec<_> = config.iter().map(|x| Repo { owner: x.owner.trim().to_string(), repo: x.repo.trim().to_string() }).collect();
|
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 {
|
let _items = join_parallel(items.into_iter().map(|mut item| async {
|
||||||
item.resolve().await;
|
item.resolve().await;
|
||||||
item
|
item
|
||||||
}))
|
})).await;
|
||||||
.await;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user