more fixes
This commit is contained in:
parent
a1dc28f25e
commit
2ec383f50c
|
@ -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" }
|
||||
]
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue