rust #10

Merged
peperunas merged 127 commits from rust into master 2021-02-18 09:42:16 +00:00
Showing only changes of commit 23c2d58647 - Show all commits

View File

@ -62,16 +62,26 @@ impl BfxBot {
}
pub async fn start_loop(&mut self) -> Result<(), BoxError> {
self.update_managers().await?;
loop {
self.update().await;
}
}
async fn update(&mut self) {
async fn update(&mut self) -> Result<(), BoxError> {
delay_for(self.ticker.duration()).await;
self.ticker.inc();
self.update_price_managers().await.unwrap();
self.update_managers().await?;
Ok(())
}
async fn update_managers(&mut self) -> Result<(), BoxError> {
self.update_price_managers().await?;
Ok(())
}
async fn update_price_managers(&mut self) -> Result<Option<Vec<Event>>, BoxError> {