Skip to content

Commit

Permalink
tidy up
Browse files Browse the repository at this point in the history
  • Loading branch information
andymck committed Aug 2, 2023
1 parent f158a19 commit 671e291
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 62 deletions.
6 changes: 0 additions & 6 deletions iot_verifier/src/hex_density.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,6 @@ lazy_static! {
};
}

// #[async_trait::async_trait]
// pub trait HexDensityMap: Clone {
// async fn get(&self, hex: u64) -> Option<Decimal>;
// async fn swap(&self, new_map: HashMap<u64, Decimal>);
// }

#[derive(Debug, Clone)]
pub struct HexDensityMap(Arc<RwLock<HashMap<u64, Decimal>>>);

Expand Down
2 changes: 1 addition & 1 deletion iot_verifier/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -304,10 +304,10 @@ impl Server {
.add_task(entropy_loader_server)
.add_task(entropy_loader)
.add_task(packet_loader)
.add_task(purger)
.add_task(loader)
.add_task(runner)
.add_task(rewarder)
.add_task(purger)
.start()
.await
}
Expand Down
13 changes: 0 additions & 13 deletions iot_verifier/src/packet_loader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,19 +57,6 @@ impl PacketLoader {

pub async fn run(mut self, shutdown: triggered::Listener) -> anyhow::Result<()> {
tracing::info!("starting iot packet loader");
// let store_base_path = Path::new(&self.cache);
// let (non_rewardable_packet_sink, mut non_rewardable_packet_server) =
// file_sink::FileSinkBuilder::new(
// FileType::NonRewardablePacket,
// store_base_path,
// concat!(env!("CARGO_PKG_NAME"), "_non_rewardable_packet"),
// shutdown.clone(),
// )
// .deposits(Some(file_upload_tx.clone()))
// .roll_time(ChronoDuration::minutes(5))
// .create()
// .await?;
// tokio::spawn(async move { non_rewardable_packet_server.run().await });

loop {
if shutdown.is_triggered() {
Expand Down
41 changes: 0 additions & 41 deletions iot_verifier/src/runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,47 +110,6 @@ impl Runner {
let mut db_timer = time::interval(DB_POLL_TIME);
db_timer.set_missed_tick_behavior(MissedTickBehavior::Skip);

// let store_base_path = Path::new(&self.cache);

// let (iot_invalid_beacon_sink, mut iot_invalid_beacon_sink_server) =
// file_sink::FileSinkBuilder::new(
// FileType::IotInvalidBeaconReport,
// store_base_path,
// concat!(env!("CARGO_PKG_NAME"), "_invalid_beacon_report"),
// shutdown.clone(),
// )
// .deposits(Some(file_upload_tx.clone()))
// .roll_time(ChronoDuration::minutes(5))
// .create()
// .await?;

// let (iot_invalid_witness_sink, mut iot_invalid_witness_sink_server) =
// file_sink::FileSinkBuilder::new(
// FileType::IotInvalidWitnessReport,
// store_base_path,
// concat!(env!("CARGO_PKG_NAME"), "_invalid_witness_report"),
// shutdown.clone(),
// )
// .deposits(Some(file_upload_tx.clone()))
// .roll_time(ChronoDuration::minutes(5))
// .create()
// .await?;

// let (iot_poc_sink, mut iot_poc_sink_server) = file_sink::FileSinkBuilder::new(
// FileType::IotPoc,
// store_base_path,
// concat!(env!("CARGO_PKG_NAME"), "_valid_poc"),
// shutdown.clone(),
// )
// .deposits(Some(file_upload_tx.clone()))
// .roll_time(ChronoDuration::minutes(2))
// .create()
// .await?;

// tokio::spawn(async move { iot_invalid_beacon_sink_server.run().await });
// tokio::spawn(async move { iot_invalid_witness_sink_server.run().await });
// tokio::spawn(async move { iot_poc_sink_server.run().await });

loop {
if shutdown.is_triggered() {
break;
Expand Down
2 changes: 1 addition & 1 deletion mobile_verifier/src/cli/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -193,9 +193,9 @@ impl Cmd {
.add_task(data_session_ingest_server)
.add_task(subscriber_location_ingestor)
.add_task(data_session_ingestor)
.add_task(rewarder)
.add_task(heartbeat_daemon)
.add_task(speedtest_daemon)
.add_task(rewarder)
.start()
.await
}
Expand Down

0 comments on commit 671e291

Please sign in to comment.