understanding commited on
Commit
9f107af
·
verified ·
1 Parent(s): 8b2f555

Update bot/core/settings.py

Browse files
Files changed (1) hide show
  1. bot/core/settings.py +12 -1
bot/core/settings.py CHANGED
@@ -7,13 +7,24 @@ 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
 
7
  MAX_RETRIES = 2
8
  TMP_DIR = "/tmp"
9
 
10
+ # ✅ Batch / UX knobs
11
+ BATCH_MAX_RANGE = 250 # max ids expanded from 4012-4046 etc.
12
+ BATCH_STOP_ON_FAIL = True # default behavior: stop batch on first failure
13
+ MAX_PARALLEL_UPLOADS = 4 # future use (currently per-user single upload)
14
+
15
+
16
  # ✅ Added: compatibility class for handlers.py
17
  class Settings:
18
  # used in handlers.py for title/description truncation
19
  MAX_TITLE: int = 100
20
  MAX_DESC: int = 5000
21
 
22
+ # batch defaults
23
+ BATCH_MAX_RANGE: int = BATCH_MAX_RANGE
24
+ BATCH_STOP_ON_FAIL: bool = BATCH_STOP_ON_FAIL
25
+ MAX_PARALLEL_UPLOADS: int = MAX_PARALLEL_UPLOADS
26
+
27
+ # expose existing module constants via class too
28
  ROTATE_AFTER: int = ROTATE_AFTER
29
  YOUTUBE_CHUNK_SIZE: int = YOUTUBE_CHUNK_SIZE
30
  HTTP_TIMEOUT_SEC: int = HTTP_TIMEOUT_SEC