|
49 | 49 | from memos.memories.activation.kv import KVCacheMemory |
50 | 50 | from memos.memories.activation.vllmkv import VLLMKVCacheItem, VLLMKVCacheMemory |
51 | 51 | from memos.memories.textual.tree import TextualMemoryItem, TreeTextMemory |
52 | | -from memos.memos_tools.notification_utils import send_online_bot_notification |
53 | 52 | from memos.templates.mem_scheduler_prompts import MEMORY_ASSEMBLY_TEMPLATE |
54 | 53 |
|
55 | 54 |
|
@@ -127,20 +126,6 @@ def __init__(self, config: BaseSchedulerConfig): |
127 | 126 | "consume_interval_seconds", DEFAULT_CONSUME_INTERVAL_SECONDS |
128 | 127 | ) |
129 | 128 |
|
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 | | - |
144 | 129 | # other attributes |
145 | 130 | self._context_lock = threading.Lock() |
146 | 131 | self.current_user_id: UserID | str | None = None |
@@ -712,13 +697,6 @@ def start(self) -> None: |
712 | 697 | self._consumer_thread.start() |
713 | 698 | logger.info("Message consumer thread started") |
714 | 699 |
|
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 | | - |
722 | 700 | def stop(self) -> None: |
723 | 701 | """Stop all scheduler components gracefully. |
724 | 702 |
|
@@ -768,9 +746,6 @@ def stop(self) -> None: |
768 | 746 | self._cleanup_queues() |
769 | 747 | logger.info("Memory Scheduler stopped completely") |
770 | 748 |
|
771 | | - # Stop queue monitor |
772 | | - self.stop_queue_monitor() |
773 | | - |
774 | 749 | @property |
775 | 750 | def handlers(self) -> dict[str, Callable]: |
776 | 751 | """ |
|
0 commit comments