thread::sleep blocking fix + better print system
This commit is contained in:
parent
19c41eff6b
commit
a17de20b2b
2 changed files with 26 additions and 20 deletions
src/config
|
@ -3,7 +3,6 @@ use std::{
|
|||
fs::{self, OpenOptions},
|
||||
io::Write,
|
||||
path::Path,
|
||||
thread::sleep,
|
||||
time,
|
||||
};
|
||||
|
||||
|
@ -17,6 +16,7 @@ use lemmy_db_schema::{
|
|||
ListingType,
|
||||
};
|
||||
use serde_derive::{Deserialize, Serialize};
|
||||
use tokio::time::sleep;
|
||||
use url::Url;
|
||||
|
||||
use crate::CLIENT;
|
||||
|
@ -161,7 +161,7 @@ impl Config {
|
|||
|
||||
post_queue.push((new_post, prev_data));
|
||||
}
|
||||
sleep(time::Duration::from_millis(100)); // Should prevent dos-ing J-Novel servers
|
||||
sleep(time::Duration::from_millis(100)).await; // Should prevent dos-ing J-Novel servers
|
||||
i += 1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue