Append state event that pass resolution to DB, update to tokio 1.1

This commit is contained in:
Devin Ragotzy 2021-01-29 11:20:33 -05:00
parent b8b40ce38b
commit cd0c5c0566
6 changed files with 322 additions and 434 deletions

View file

@ -674,9 +674,10 @@ pub async fn sync_events_route(
if duration.as_secs() > 30 {
duration = Duration::from_secs(30);
}
let mut delay = tokio::time::delay_for(duration);
let delay = tokio::time::sleep(duration);
tokio::pin!(delay);
tokio::select! {
_ = &mut delay => {}
_ = &mut delay, if delay.is_elapsed() => {}
_ = watcher => {}
}
}