skip if empty waitinglist
This commit is contained in:
parent
b09e8eafbb
commit
47c353c7da
2 changed files with 7 additions and 2 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -4,4 +4,5 @@
|
||||||
!/cli/
|
!/cli/
|
||||||
!Cargo.toml
|
!Cargo.toml
|
||||||
!/*/src/
|
!/*/src/
|
||||||
|
!/*/src/**/
|
||||||
!/*/src/**/*.rs
|
!/*/src/**/*.rs
|
||||||
|
|
|
||||||
|
|
@ -237,6 +237,11 @@ async fn main() -> Result<()> {
|
||||||
}) {
|
}) {
|
||||||
log::debug!("{:?}", spond.responses);
|
log::debug!("{:?}", spond.responses);
|
||||||
|
|
||||||
|
if spond.responses.waitinglist_ids.is_empty() {
|
||||||
|
log::info!("nobody on the waiting list");
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
let spond = &spond;
|
let spond = &spond;
|
||||||
let decline = |id: &api::MemberId| {
|
let decline = |id: &api::MemberId| {
|
||||||
log::info!("remove {0}", *id);
|
log::info!("remove {0}", *id);
|
||||||
|
|
@ -313,8 +318,7 @@ async fn main() -> Result<()> {
|
||||||
responses = accept(&id).await?;
|
responses = accept(&id).await?;
|
||||||
extra.push(id);
|
extra.push(id);
|
||||||
}
|
}
|
||||||
|
tokio::time::sleep(tokio::time::Duration::from_secs(5)).await;
|
||||||
tokio::time::sleep(tokio::time::Duration::from_secs(10)).await;
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue