修正dispatcher,使用redis存任务队列,修正submission的post,修改部分settings

This commit is contained in:
zemal
2017-05-10 17:20:52 +08:00
parent 4733eecef9
commit 08bd591bfb
13 changed files with 133 additions and 107 deletions

View File

@@ -41,7 +41,8 @@ class JudgeServer(models.Model):
@property
def status(self):
if (timezone.now() - self.last_heartbeat).total_seconds() > 5:
# 增加一秒延时,提高对网络环境的适应性
if (timezone.now() - self.last_heartbeat).total_seconds() > 6:
return "abnormal"
return "normal"