move all trend filters from gatherer to hunter

This commit is contained in:
Astro 2022-11-09 19:25:07 +01:00
parent 9a27b117a8
commit 1092194bba
2 changed files with 3 additions and 11 deletions

View File

@ -84,18 +84,8 @@ impl TrendAnalyzer {
}
pub fn process_tag(&mut self, name: &Arc<String>, tag: &Arc<TrendTag>) {
if tag.hosts().skip(1).next().is_none() {
// ignore spam that is posted by accounts on <1 host
return;
}
let score = tag.score(self.period, self.until);
if score <= 0. {
// // discard downwards trends
return;
}
if self.score_threshold.map_or(false, |score_threshold| score < score_threshold) {
// score is below self.result[..self.size].score
return;

View File

@ -123,7 +123,9 @@ async fn run(
for trend_tag in &trend_tags {
for (period, scores) in &mut period_scores {
let score = trend_tag.score(*period, until);
scores.push((score, trend_tag));
if score > 0. {
scores.push((score, trend_tag));
}
}
}
// order