fix: never_cache sync wrapper broke async dispatch - add async_never_cache_dispatch (wallet/login_record/tasks)
This commit is contained in:
@@ -11,6 +11,7 @@ import logging
|
||||
|
||||
from asgiref.sync import sync_to_async
|
||||
|
||||
from utils.async_decorators import async_never_cache_dispatch
|
||||
from utils.response_codes import (
|
||||
ResponseCode,
|
||||
create_standardized_response,
|
||||
@@ -25,7 +26,7 @@ from chunyu_project.common_schemas import success_response, error_response, unau
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@method_decorator(never_cache, name='dispatch')
|
||||
@async_never_cache_dispatch
|
||||
class WalletBalanceAPIView(APIView):
|
||||
permission_classes = [IsAuthenticated]
|
||||
|
||||
@@ -222,7 +223,7 @@ async def track_checkin_task(user):
|
||||
logger.error(f'签到任务进度更新失败: {e}')
|
||||
|
||||
|
||||
@method_decorator(never_cache, name='dispatch')
|
||||
@async_never_cache_dispatch
|
||||
class CheckinStatusAPIView(APIView):
|
||||
permission_classes = [IsAuthenticated]
|
||||
|
||||
@@ -277,7 +278,7 @@ class CheckinStatusAPIView(APIView):
|
||||
)
|
||||
|
||||
|
||||
@method_decorator(never_cache, name='dispatch')
|
||||
@async_never_cache_dispatch
|
||||
class CheckinAPIView(APIView):
|
||||
permission_classes = [IsAuthenticated]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user