Skip to content

fix: component_init initialize scheduler every time#915

Merged
CaralHsi merged 7 commits intoMemTensor:dev-20260119-v2.0.3from
tangg555:dev-0119
Jan 21, 2026
Merged

fix: component_init initialize scheduler every time#915
CaralHsi merged 7 commits intoMemTensor:dev-20260119-v2.0.3from
tangg555:dev-0119

Conversation

@tangg555
Copy link
Collaborator

@tangg555 tangg555 commented Jan 20, 2026

Description

fix: component_init initialize scheduler every time

Summary: (summary)
This PR addresses two main issues related to scheduler initialization and Redis dependency:

  1. Conditional Redis Initialization: Refactored init_server in component_init to only initialize the Redis client when MEMSCHEDULER_USE_REDIS_QUEUE is explicitly enabled. Previously, it would attempt to initialize Redis unconditionally, which could cause issues in environments without Redis.
  2. Mix Search Fallback: Updated mix_search_memories to check if the Redis queue is enabled. If Redis is not configured, the scheduler now gracefully degrades to fast search mode (skipping history reranking and async updates) instead of throwing an error when attempting to access the uninitialized Redis module.

Fix: #(issue)

Docs Issue/PR: (docs-issue-or-pr-link)

Reviewer: @(reviewer)
@glin93

Checklist:

  • I have performed a self-review of my own code | 我已自行检查了自己的代码
  • I have commented my code in hard-to-understand areas | 我已在难以理解的地方对代码进行了注释
  • I have added tests that prove my fix is effective or that my feature works | 我已添加测试以证明我的修复有效或功能正常
  • I have created related documentation issue/PR in MemOS-Docs (if applicable) | 我已在 MemOS-Docs 中创建了相关的文档 issue/PR(如果适用)
  • I have linked the issue to this PR (if applicable) | 我已将 issue 链接到此 PR(如果适用)
  • I have mentioned the person who will review this PR | 我已提及将审查此 PR 的人

@CaralHsi CaralHsi merged commit 0ab1389 into MemTensor:dev-20260119-v2.0.3 Jan 21, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants