From 800df996743209d0accfaa12f1da1b23d915f7bc Mon Sep 17 00:00:00 2001 From: simpleqt <89645338+simpleqt@users.noreply.github.com> Date: Sat, 19 Sep 2026 16:01:26 +0800 Subject: [PATCH] docs(scheduler): align docstrings with the real signatures - SchedulerOrchestrator.__init__ takes no arguments; drop the phantom 'queue' Args block - QueryMonitorQueue.to_json/from_json take no serializer arguments; drop the phantom 'item_serializer'/'item_deserializer' Args entries - RedisTaskQueue documents both 'max_len' and a stale 'maxsize' entry; drop the stale one (no maxsize parameter exists) --- src/memos/mem_scheduler/schemas/monitor_schemas.py | 6 ------ .../mem_scheduler/task_schedule_modules/orchestrator.py | 5 +---- .../mem_scheduler/task_schedule_modules/redis_queue.py | 1 - 3 files changed, 1 insertion(+), 11 deletions(-) diff --git a/src/memos/mem_scheduler/schemas/monitor_schemas.py b/src/memos/mem_scheduler/schemas/monitor_schemas.py index fd4204969..0a41736df 100644 --- a/src/memos/mem_scheduler/schemas/monitor_schemas.py +++ b/src/memos/mem_scheduler/schemas/monitor_schemas.py @@ -141,10 +141,6 @@ def get_queries_with_timesort(self, reverse: bool = True) -> list[str]: def to_json(self) -> str: """Serialize the queue to a JSON string. - Args: - item_serializer: Optional function to serialize individual items. - If not provided, items must be JSON-serializable. - Returns: A JSON string representing the queue's content and maxsize. """ @@ -160,8 +156,6 @@ def from_json(cls, json_str: str) -> "QueryMonitorQueue": Args: json_str: JSON string created by to_json() - item_deserializer: Optional function to reconstruct items from dicts. - If not provided, items are used as-is. Returns: A new AutoDroppingQueue instance with deserialized data. diff --git a/src/memos/mem_scheduler/task_schedule_modules/orchestrator.py b/src/memos/mem_scheduler/task_schedule_modules/orchestrator.py index af46b3dcd..d8d359008 100644 --- a/src/memos/mem_scheduler/task_schedule_modules/orchestrator.py +++ b/src/memos/mem_scheduler/task_schedule_modules/orchestrator.py @@ -29,10 +29,7 @@ class SchedulerOrchestrator(RedisSchedulerModule): def __init__(self): - """ - Args: - queue: An instance of `SchedulerRedisQueue`. - """ + """Initialize the orchestrator with an empty fetch cache.""" # Cache of fetched messages grouped by (user_id, mem_cube_id, task_label) self._cache = None self.tasks_priorities = {} diff --git a/src/memos/mem_scheduler/task_schedule_modules/redis_queue.py b/src/memos/mem_scheduler/task_schedule_modules/redis_queue.py index 79f40def4..8514b3690 100644 --- a/src/memos/mem_scheduler/task_schedule_modules/redis_queue.py +++ b/src/memos/mem_scheduler/task_schedule_modules/redis_queue.py @@ -61,7 +61,6 @@ def __init__( consumer_group: Name of the consumer group consumer_name: Name of the consumer (auto-generated if None) max_len: Maximum length of the stream (for memory management) - maxsize: Maximum size of the queue (for Queue compatibility, ignored) auto_delete_acked: Whether to automatically delete acknowledged messages from stream """ super().__init__()