mirror of
https://git.vectorsigma.ru/public/tubearchivist.git
synced 2026-08-04 21:39:49 +00:00
dynamic sleep
This commit is contained in:
@@ -74,7 +74,7 @@ class AppConfig:
|
||||
},
|
||||
"downloads": {
|
||||
"limit_speed": False,
|
||||
"sleep_interval": 3,
|
||||
"sleep_interval": 10,
|
||||
"autodelete_days": False,
|
||||
"format": False,
|
||||
"format_sort": False,
|
||||
|
||||
@@ -14,6 +14,7 @@ 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.ta_redis import RedisQueue
|
||||
from download.src.subscriptions import ChannelSubscription
|
||||
from download.src.thumbnails import ThumbManager
|
||||
@@ -289,8 +290,7 @@ class Reindex(ReindexBase):
|
||||
self._notify(name, total, idx)
|
||||
|
||||
reindex(youtube_id)
|
||||
sleep_interval = self.config["downloads"].get("sleep_interval", 0)
|
||||
sleep(sleep_interval)
|
||||
sleep(get_sleep(self.config))
|
||||
|
||||
def _get_reindex_map(self, index_name: str) -> Callable:
|
||||
"""return def to run for index"""
|
||||
|
||||
Reference in New Issue
Block a user