Skip to content

Replace external osrs RateLimiter with internal bot_detector.rate_limiter component in runemetrics_api #123

Description

@extreme4all-ai

Summary

components/bot_detector/runemetrics_api/core.py imports from osrs.utils import RateLimiter (external osrs package) instead of using the internal bot_detector.rate_limiter component.

This creates a hidden dependency on an external package for functionality that already exists as a component. Since components should be self-contained and use internal dependencies, this should be migrated.

Proposed Change

Replace from osrs.utils import RateLimiter with from bot_detector.rate_limiter import RateLimiter in components/bot_detector/runemetrics_api/core.py.

Ensure rate_limiter is listed as a dependency in the runemetrics_api component config if needed.

Context

Migration artifact. The internal rate_limiter component provides the same functionality and is used consistently across other bases (hiscore_scraper, discord_bot).

Note: This change unblocks the corresponding fix in runemetrics_scraper base — both should be migrated together.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions