aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2024-01-28 23:48:10 +0100
committermetamuffin <metamuffin@disroot.org>2024-01-28 23:48:10 +0100
commit95c4c4ae8d089af1f3d07887cbf437555c2d6159 (patch)
tree65e807bd06574907e70a69dd6c2d7327739eb6e7
parentab0e2e306b7872d1c1e6494994070f52fe1b3c00 (diff)
downloadjellything-95c4c4ae8d089af1f3d07887cbf437555c2d6159.tar
jellything-95c4c4ae8d089af1f3d07887cbf437555c2d6159.tar.bz2
jellything-95c4c4ae8d089af1f3d07887cbf437555c2d6159.tar.zst
remove 5s sleep from import routine
-rw-r--r--import/src/lib.rs5
1 files changed, 1 insertions, 4 deletions
diff --git a/import/src/lib.rs b/import/src/lib.rs
index 9618d96..0c0e235 100644
--- a/import/src/lib.rs
+++ b/import/src/lib.rs
@@ -39,10 +39,9 @@ use std::{
ops::Deref,
path::{Path, PathBuf},
sync::{Arc, LazyLock},
- time::Duration,
};
use tmdb::{parse_release_date, Tmdb};
-use tokio::{io::AsyncWriteExt, sync::Semaphore, task::spawn_blocking, time::sleep};
+use tokio::{io::AsyncWriteExt, sync::Semaphore, task::spawn_blocking};
use trakt::Trakt;
static IMPORT_SEM: LazyLock<Semaphore> = LazyLock::new(|| Semaphore::new(1));
@@ -58,8 +57,6 @@ pub fn is_importing() -> bool {
pub async fn import(db: &DataAcid, fed: &Federation) -> anyhow::Result<()> {
let permit = IMPORT_SEM.try_acquire()?;
-
- sleep(Duration::from_secs(5)).await;
{
let txn = db.inner.begin_write()?;
let mut table = txn.open_table(T_NODE_IMPORT)?;