From 95c4c4ae8d089af1f3d07887cbf437555c2d6159 Mon Sep 17 00:00:00 2001 From: metamuffin Date: Sun, 28 Jan 2024 23:48:10 +0100 Subject: remove 5s sleep from import routine --- import/src/lib.rs | 5 +---- 1 file changed, 1 insertion(+), 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 = 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)?; -- cgit v1.2.3-70-g09d2