Try slowing down rejudge enqueue
This commit is contained in:
parent
966e8c9db5
commit
d80ec962a5
1 changed files with 2 additions and 0 deletions
|
@ -1,6 +1,7 @@
|
|||
from celery import shared_task
|
||||
from django.core.cache import cache
|
||||
from django.utils.translation import gettext as _
|
||||
from time import sleep
|
||||
|
||||
from judge.models import Problem, Profile, Submission
|
||||
from judge.utils.celery import Progress
|
||||
|
@ -34,6 +35,7 @@ def rejudge_problem_filter(
|
|||
for submission in queryset.iterator():
|
||||
submission.judge(rejudge=True, batch_rejudge=True)
|
||||
rejudged += 1
|
||||
sleep(0.1)
|
||||
if rejudged % 10 == 0:
|
||||
p.done = rejudged
|
||||
return rejudged
|
||||
|
|
Loading…
Reference in a new issue