修改Channel Layers配置为InMemoryChannelLayer并修复文档数量统计

This commit is contained in:
dspwasc 2025-04-14 11:12:18 +08:00
parent 5eb4ccd7fd
commit 58d0c021b3
3 changed files with 5060 additions and 3969 deletions

View File

@ -14,7 +14,7 @@ import os
from pathlib import Path
# API 配置
API_BASE_URL = 'http://180.163.88.62:30331'
API_BASE_URL = 'http://81.69.223.133:48329'
DEPARTMENT_GROUPS = {
"技术部": ["开发组", "测试组", "运维组"],
@ -103,7 +103,7 @@ DATABASES = {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'rolebasedfilemanagement',
'USER': 'root',
'PASSWORD': '123456',
'PASSWORD': 'Ooin2025!',
'HOST': 'localhost',
'PORT': '3306',
'OPTIONS': {
@ -138,11 +138,11 @@ AUTH_PASSWORD_VALIDATORS = [
LANGUAGE_CODE = 'en-us'
TIME_ZONE = 'UTC'
TIME_ZONE = 'Asia/Shanghai'
USE_I18N = True
USE_TZ = True
USE_TZ = False
@ -168,12 +168,7 @@ ASGI_APPLICATION = "role_based_system.asgi.application"
# Channel Layers 配置
CHANNEL_LAYERS = {
"default": {
"BACKEND": "channels_redis.core.RedisChannelLayer",
"CONFIG": {
"hosts": [("127.0.0.1", 6379)],
"capacity": 1500, # 消息队列容量
"expiry": 10, # 消息过期时间(秒)
},
"BACKEND": "channels.layers.InMemoryChannelLayer",
},
}

View File

@ -20,7 +20,6 @@ from .views import (
router = DefaultRouter()
# 注册视图集
router.register(r'knowledge-bases', KnowledgeBaseViewSet, basename='knowledge-base')
router.register(r'knowledge-bases', KnowledgeBaseViewSet, basename='knowledge-bases')
router.register(r'permissions', PermissionViewSet, basename='permission')
router.register(r'notifications', NotificationViewSet, basename='notification')

File diff suppressed because it is too large Load Diff