Add hive to main join!().

This commit is contained in:
Paul Makles
2020-12-29 23:25:52 +00:00
parent c704f13d72
commit af56f5e2d8
6 changed files with 78 additions and 23 deletions

View File

@@ -36,13 +36,18 @@ async fn entry() {
util::variables::preflight_checks();
database::connect().await;
notifications::hive::init_hive().await;
ctrlc::set_handler(move || {
// Force ungraceful exit to avoid hang.
std::process::exit(0);
}).expect("Error setting Ctrl-C handler");
join!(launch_web(), notifications::websocket::launch_server());
join!(
launch_web(),
notifications::websocket::launch_server(),
notifications::hive::listen(),
);
}
async fn launch_web() {