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 = "fat trixie", why = "icjb" }
|
||||||
, Rule::{ regex = "soros", why = "conspiracy theories" }
|
, Rule::{ regex = "soros", why = "conspiracy theories" }
|
||||||
, Rule::{ regex = "(foal|loli)con", why = "illegal stuff" }
|
, 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(),
|
cfg.furbooru_api_key.clone(),
|
||||||
)?;
|
)?;
|
||||||
log::info!("listening on the firehose");
|
log::info!("listening on the firehose");
|
||||||
|
let mut tries: u64 = 0;
|
||||||
|
|
||||||
loop {
|
loop {
|
||||||
if let Err(why) = cli
|
if let Err(why) = cli
|
||||||
|
@ -260,6 +261,13 @@ async fn main() -> Result<()> {
|
||||||
cfg.discord_webhook_url.clone(),
|
cfg.discord_webhook_url.clone(),
|
||||||
Body::new(format!("firehose error:\n```\n{:#?}\n```", why))
|
Body::new(format!("firehose error:\n```\n{:#?}\n```", why))
|
||||||
).await?;
|
).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