more fixes

This commit is contained in:
Cadey Ratio 2020-07-06 13:25:07 -04:00
parent a1dc28f25e
commit 2ec383f50c
2 changed files with 9 additions and 0 deletions

View File

@ -22,4 +22,5 @@ in [ Rule::{ regex = "(n|z)igg(er|a)", why = "racism" }
, Rule::{ regex = "fat trixie", why = "icjb" }
, Rule::{ regex = "soros", why = "conspiracy theories" }
, Rule::{ regex = "(foal|loli)con", why = "illegal stuff" }
, Rule::{ regex = "cuck", why = "slur" }
]

View File

@ -242,6 +242,7 @@ async fn main() -> Result<()> {
cfg.furbooru_api_key.clone(),
)?;
log::info!("listening on the firehose");
let mut tries: u64 = 0;
loop {
if let Err(why) = cli
@ -260,6 +261,13 @@ async fn main() -> Result<()> {
cfg.discord_webhook_url.clone(),
Body::new(format!("firehose error:\n```\n{:#?}\n```", why))
).await?;
std::thread::sleep(std::time::Duration::from_millis(tries * 1000));
if tries == 5 {
return Err(why);
}
tries = tries + 1;
}
}
}