|
@@ -252,7 +252,7 @@ class ChatChannel(Channel): |
|
|
session_id = context['session_id'] |
|
|
session_id = context['session_id'] |
|
|
with self.lock: |
|
|
with self.lock: |
|
|
if session_id not in self.sessions: |
|
|
if session_id not in self.sessions: |
|
|
self.sessions[session_id] = [Dequeue(), threading.BoundedSemaphore(conf().get("concurrency_in_session", 1))] |
|
|
|
|
|
|
|
|
self.sessions[session_id] = [Dequeue(), threading.BoundedSemaphore(conf().get("concurrency_in_session", 4))] |
|
|
if context.type == ContextType.TEXT and context.content.startswith("#"): |
|
|
if context.type == ContextType.TEXT and context.content.startswith("#"): |
|
|
self.sessions[session_id][0].putleft(context) # 优先处理管理命令 |
|
|
self.sessions[session_id][0].putleft(context) # 优先处理管理命令 |
|
|
else: |
|
|
else: |
|
|