更换cache使用方式
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
import hashlib
|
||||
|
||||
from django.utils import timezone
|
||||
from django_redis import get_redis_connection
|
||||
|
||||
from account.decorators import super_admin_required
|
||||
from judge.languages import languages, spj_languages
|
||||
@@ -129,8 +128,7 @@ class JudgeServerHeartbeatAPI(CSRFExemptAPIView):
|
||||
last_heartbeat=timezone.now(),
|
||||
)
|
||||
# 新server上线 处理队列中的,防止没有新的提交而导致一直waiting
|
||||
conn = get_redis_connection("JudgeQueue")
|
||||
process_pending_task(conn)
|
||||
process_pending_task()
|
||||
|
||||
return self.success()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user