Skip to content

Commit eba2f95

Browse files
committed
fix: base scheduler bug
1 parent 83d0871 commit eba2f95

File tree

1 file changed

+0
-25
lines changed

1 file changed

+0
-25
lines changed

src/memos/mem_scheduler/base_scheduler.py

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@
4949
from memos.memories.activation.kv import KVCacheMemory
5050
from memos.memories.activation.vllmkv import VLLMKVCacheItem, VLLMKVCacheMemory
5151
from memos.memories.textual.tree import TextualMemoryItem, TreeTextMemory
52-
from memos.memos_tools.notification_utils import send_online_bot_notification
5352
from memos.templates.mem_scheduler_prompts import MEMORY_ASSEMBLY_TEMPLATE
5453

5554

@@ -127,20 +126,6 @@ def __init__(self, config: BaseSchedulerConfig):
127126
"consume_interval_seconds", DEFAULT_CONSUME_INTERVAL_SECONDS
128127
)
129128

130-
# queue monitor (optional)
131-
self._queue_monitor_thread: threading.Thread | None = None
132-
self._queue_monitor_running: bool = False
133-
self.queue_monitor_interval_seconds: float = self.config.get(
134-
"queue_monitor_interval_seconds", 60.0
135-
)
136-
self.queue_monitor_warn_utilization: float = self.config.get(
137-
"queue_monitor_warn_utilization", 0.7
138-
)
139-
self.queue_monitor_crit_utilization: float = self.config.get(
140-
"queue_monitor_crit_utilization", 0.9
141-
)
142-
self.enable_queue_monitor: bool = self.config.get("enable_queue_monitor", False)
143-
144129
# other attributes
145130
self._context_lock = threading.Lock()
146131
self.current_user_id: UserID | str | None = None
@@ -712,13 +697,6 @@ def start(self) -> None:
712697
self._consumer_thread.start()
713698
logger.info("Message consumer thread started")
714699

715-
# optionally start queue monitor if enabled and bot callable present
716-
if self.enable_queue_monitor and self._online_bot_callable is not None:
717-
try:
718-
self.start_queue_monitor(self._online_bot_callable)
719-
except Exception as e:
720-
logger.warning(f"Failed to start queue monitor: {e}")
721-
722700
def stop(self) -> None:
723701
"""Stop all scheduler components gracefully.
724702
@@ -768,9 +746,6 @@ def stop(self) -> None:
768746
self._cleanup_queues()
769747
logger.info("Memory Scheduler stopped completely")
770748

771-
# Stop queue monitor
772-
self.stop_queue_monitor()
773-
774749
@property
775750
def handlers(self) -> dict[str, Callable]:
776751
"""

0 commit comments

Comments
 (0)