Run new tasks at startup

This commit is contained in:
Mark Sinclair
2021-10-06 20:48:09 +01:00
parent a5091cd124
commit 2fda22e168
+6 -1
View File
@@ -36,7 +36,12 @@ impl ExplorerApi {
info!("Explorer API starting up...");
// spawn concurrent tasks
country_statistics::CountryStatistics::new(self.state.clone()).start();
mix_nodes::tasks::MixNodesTasks::new(self.state.clone()).start();
country_statistics::distribution::CountryStatisticsDistributionTask::new(
self.state.clone(),
)
.start();
country_statistics::geolocate::GeoLocateTask::new(self.state.clone()).start();
http::start(self.state.clone());
// wait for user to press ctrl+C