diff options
| author | Fuwn <[email protected]> | 2025-09-16 16:16:41 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2025-09-16 16:16:41 -0700 |
| commit | 77dc89bc2a3fcd0d53ee30139dbb3d3b9c73d2fb (patch) | |
| tree | 83cfbe0f5a109bf6da2d24e8fe224eccdde097dd | |
| parent | feat(roleplay_limiter): Lower surge threshold limits (diff) | |
| download | umabot-77dc89bc2a3fcd0d53ee30139dbb3d3b9c73d2fb.tar.xz umabot-77dc89bc2a3fcd0d53ee30139dbb3d3b9c73d2fb.zip | |
feat(roleplay_limiter): Lower surge thresholds
| -rw-r--r-- | src/umabot/config.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/umabot/config.py b/src/umabot/config.py index a58c446..39c034c 100644 --- a/src/umabot/config.py +++ b/src/umabot/config.py @@ -33,10 +33,10 @@ class Config: roleplay_limit_window_hours: int = 24 # hours dry_run: bool = False - # Surge-based roleplay limiting - roleplay_surge_threshold_1: int = 25 # First threshold for surge detection - roleplay_surge_threshold_2: int = 45 # Second threshold for surge detection - roleplay_surge_threshold_3: int = 70 # Third threshold for surge detection + # Surge-based roleplay limiting (data-driven thresholds) + roleplay_surge_threshold_1: int = 8 # First threshold: ~27% of daily posts + roleplay_surge_threshold_2: int = 12 # Second threshold: ~41% of daily posts + roleplay_surge_threshold_3: int = 16 # Third threshold: ~55% of daily posts @classmethod def from_env(cls) -> "Config": @@ -58,9 +58,9 @@ class Config: post_limit_window_hours=int(os.getenv("POST_LIMIT_WINDOW_HOURS", "24")), roleplay_limit_window_hours=int(os.getenv("ROLEPLAY_LIMIT_WINDOW_HOURS", "24")), dry_run=os.getenv("DRY_RUN", "false").lower() == "true", - roleplay_surge_threshold_1=int(os.getenv("ROLEPLAY_SURGE_THRESHOLD_1", "25")), - roleplay_surge_threshold_2=int(os.getenv("ROLEPLAY_SURGE_THRESHOLD_2", "45")), - roleplay_surge_threshold_3=int(os.getenv("ROLEPLAY_SURGE_THRESHOLD_3", "70")), + roleplay_surge_threshold_1=int(os.getenv("ROLEPLAY_SURGE_THRESHOLD_1", "8")), + roleplay_surge_threshold_2=int(os.getenv("ROLEPLAY_SURGE_THRESHOLD_2", "12")), + roleplay_surge_threshold_3=int(os.getenv("ROLEPLAY_SURGE_THRESHOLD_3", "16")), ) def validate(self) -> None: |