consolidate rand_sleep

This commit is contained in:
Simon
2025-01-11 14:18:55 +07:00
parent 73396da7f6
commit 2474a6a96b
5 changed files with 16 additions and 22 deletions

View File

@@ -7,14 +7,13 @@ functionality:
import json
import os
from datetime import datetime
from time import sleep
from typing import Callable, TypedDict
from appsettings.src.config import AppConfig
from channel.src.index import YoutubeChannel
from common.src.env_settings import EnvironmentSettings
from common.src.es_connect import ElasticWrap, IndexPaginate
from common.src.helper import get_sleep
from common.src.helper import rand_sleep
from common.src.ta_redis import RedisQueue
from download.src.subscriptions import ChannelSubscription
from download.src.thumbnails import ThumbManager
@@ -290,7 +289,7 @@ class Reindex(ReindexBase):
self._notify(name, total, idx)
reindex(youtube_id)
sleep(get_sleep(self.config))
rand_sleep(self.config)
def _get_reindex_map(self, index_name: str) -> Callable:
"""return def to run for index"""