Spaces:
Runtime error
Runtime error
File size: 1,031 Bytes
760b1a7 904accf 760b1a7 904accf 9f107af 904accf 9f107af 904accf |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# 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 |