Spaces:
Runtime error
Runtime error
Update bot/core/settings.py
Browse files- bot/core/settings.py +16 -1
bot/core/settings.py
CHANGED
|
@@ -1,6 +1,21 @@
|
|
| 1 |
# PATH: bot/core/settings.py
|
|
|
|
|
|
|
| 2 |
ROTATE_AFTER = 30 # your rule
|
| 3 |
YOUTUBE_CHUNK_SIZE = 8 * 1024 * 1024
|
| 4 |
HTTP_TIMEOUT_SEC = 60
|
| 5 |
MAX_RETRIES = 2
|
| 6 |
-
TMP_DIR = "/tmp"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
# PATH: bot/core/settings.py
|
| 2 |
+
|
| 3 |
+
# existing settings
|
| 4 |
ROTATE_AFTER = 30 # your rule
|
| 5 |
YOUTUBE_CHUNK_SIZE = 8 * 1024 * 1024
|
| 6 |
HTTP_TIMEOUT_SEC = 60
|
| 7 |
MAX_RETRIES = 2
|
| 8 |
+
TMP_DIR = "/tmp"
|
| 9 |
+
|
| 10 |
+
# ✅ Added: compatibility class for handlers.py
|
| 11 |
+
class Settings:
|
| 12 |
+
# used in handlers.py for title/description truncation
|
| 13 |
+
MAX_TITLE: int = 100
|
| 14 |
+
MAX_DESC: int = 5000
|
| 15 |
+
|
| 16 |
+
# optional: expose existing module constants via class too (handy for imports)
|
| 17 |
+
ROTATE_AFTER: int = ROTATE_AFTER
|
| 18 |
+
YOUTUBE_CHUNK_SIZE: int = YOUTUBE_CHUNK_SIZE
|
| 19 |
+
HTTP_TIMEOUT_SEC: int = HTTP_TIMEOUT_SEC
|
| 20 |
+
MAX_RETRIES: int = MAX_RETRIES
|
| 21 |
+
TMP_DIR: str = TMP_DIR
|