more aggressive filter
This commit is contained in:
parent
733f9b02b6
commit
ce0276cee1
|
@ -97,8 +97,9 @@ fn filter_messages(messages: &mut Vec<RetrievedMessage>) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
let brand_new = time_since_creation < Duration::hours(6);
|
// originally thresholds were 6 hours and 2 days
|
||||||
let new = time_since_creation < Duration::days(2);
|
let brand_new = time_since_creation < Duration::minutes(30);
|
||||||
|
let new = time_since_creation < Duration::hours(2);
|
||||||
|
|
||||||
let mut numerator = 1;
|
let mut numerator = 1;
|
||||||
if brand_new {
|
if brand_new {
|
||||||
|
@ -113,8 +114,8 @@ fn filter_messages(messages: &mut Vec<RetrievedMessage>) {
|
||||||
numerator += rounded.max(nearby / 2);
|
numerator += rounded.max(nearby / 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
println!(" chance: {}/{}", numerator, nearby);
|
println!(" chance: {}/{}", numerator, nearby * 2);
|
||||||
if rand::thread_rng().gen_ratio(numerator.min(nearby), nearby) {
|
if rand::thread_rng().gen_ratio(numerator.min(nearby), nearby * 2) {
|
||||||
ids.push(a.id.clone());
|
ids.push(a.id.clone());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user