Skip to content

Commit

Permalink
Merge pull request #696 from helium/andymck/reinstate-processing-of-a…
Browse files Browse the repository at this point in the history
…ll-cbrs-heartbeats

process all cbrs heartbeats, remove filtering
  • Loading branch information
andymck authored Jan 9, 2024
2 parents 7aaf177 + 195b925 commit dccc965
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions mobile_verifier/src/heartbeats/cbrs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,24 +94,18 @@ where
async fn process_file(
&self,
file: FileInfoStream<CbrsHeartbeatIngestReport>,
heartbeat_cache: &Arc<Cache<(String, DateTime<Utc>), ()>>,
heartbeat_cache: &Cache<(String, DateTime<Utc>), ()>,
coverage_claim_time_cache: &CoverageClaimTimeCache,
coverage_objects: &CoverageObjects,
) -> anyhow::Result<()> {
tracing::info!("Processing CBRS heartbeat file {}", file.file_info.key);
let mut transaction = self.pool.begin().await?;
let epoch = (file.file_info.timestamp - Duration::hours(3))
..(file.file_info.timestamp + Duration::minutes(30));
let heartbeat_cache_clone = heartbeat_cache.clone();
let heartbeats = file
.into_stream(&mut transaction)
.await?
.map(Heartbeat::from)
.filter(move |h| {
let hb_cache = heartbeat_cache_clone.clone();
let id = h.id().unwrap();
async move { hb_cache.get(&id).await.is_none() }
});
.map(Heartbeat::from);
process_validated_heartbeats(
ValidatedHeartbeat::validate_heartbeats(
&self.gateway_info_resolver,
Expand Down

0 comments on commit dccc965

Please sign in to comment.