修改更新频繁时的返回

This commit is contained in:
weidong 2022-03-28 16:08:57 +08:00
parent d65842063a
commit 36ebb5d1a6
1 changed files with 2 additions and 1 deletions

View File

@ -274,7 +274,8 @@ class UpdateSaView(APIView):
interval_time = 60 * 10
current_time = time.time()
if current_time - LAST_UPDATE_SA_TIME < interval_time:
return success(result="The data has been updated recently,no need to update it again")
return success(message="forbidden",
result="The data has been updated recently,no need to update it again")
else:
upsa()
LAST_UPDATE_SA_TIME = time.time()