YouTubeLoader / bot /core /settings.py
understanding's picture
Update bot/core/settings.py
9f107af verified
# PATH: bot/core/settings.py
# existing settings
ROTATE_AFTER = 30 # your rule
YOUTUBE_CHUNK_SIZE = 8 * 1024 * 1024
HTTP_TIMEOUT_SEC = 60
MAX_RETRIES = 2
TMP_DIR = "/tmp"
# ✅ Batch / UX knobs
BATCH_MAX_RANGE = 250 # max ids expanded from 4012-4046 etc.
BATCH_STOP_ON_FAIL = True # default behavior: stop batch on first failure
MAX_PARALLEL_UPLOADS = 4 # future use (currently per-user single upload)
# ✅ Added: compatibility class for handlers.py
class Settings:
# used in handlers.py for title/description truncation
MAX_TITLE: int = 100
MAX_DESC: int = 5000
# batch defaults
BATCH_MAX_RANGE: int = BATCH_MAX_RANGE
BATCH_STOP_ON_FAIL: bool = BATCH_STOP_ON_FAIL
MAX_PARALLEL_UPLOADS: int = MAX_PARALLEL_UPLOADS
# expose existing module constants via class too
ROTATE_AFTER: int = ROTATE_AFTER
YOUTUBE_CHUNK_SIZE: int = YOUTUBE_CHUNK_SIZE
HTTP_TIMEOUT_SEC: int = HTTP_TIMEOUT_SEC
MAX_RETRIES: int = MAX_RETRIES
TMP_DIR: str = TMP_DIR