diff --git a/mobile_verifier/src/subscriber_location.rs b/mobile_verifier/src/subscriber_location.rs index 5a9aa9aab..9cd25f0d3 100644 --- a/mobile_verifier/src/subscriber_location.rs +++ b/mobile_verifier/src/subscriber_location.rs @@ -1,4 +1,4 @@ -use chrono::{DateTime, Duration, Utc}; +use chrono::{DateTime, Utc}; use file_store::{ file_info_poller::FileInfoStream, file_sink::FileSinkClient, @@ -18,8 +18,6 @@ use sqlx::{PgPool, Postgres, Transaction}; use std::ops::Range; use tokio::sync::mpsc::Receiver; -const SUBSCRIBER_REWARD_PERIOD_LENGTH_IN_DAYS: i64 = 14; - pub type SubscriberValidatedLocations = Vec>; pub struct SubscriberLocationIngestor { @@ -175,13 +173,11 @@ pub struct SubscriberLocationShare { pub async fn aggregate_location_shares( db: impl sqlx::PgExecutor<'_> + Copy, - reward_period: &Range>, + _reward_period: &Range>, ) -> Result { let mut rows = sqlx::query_as::<_, SubscriberLocationShare>( - "select distinct(subscriber_id) from subscriber_loc_verified where received_timestamp >= $1 and received_timestamp < $2", + "select distinct(subscriber_id) from subscriber_loc_verified", ) - .bind(reward_period.end - Duration::days(SUBSCRIBER_REWARD_PERIOD_LENGTH_IN_DAYS)) - .bind(reward_period.end) .fetch(db); let mut location_shares = SubscriberValidatedLocations::new(); while let Some(share) = rows.try_next().await? {