mirror of
https://github.com/lkeme/BiliHelper-personal.git
synced 2025-12-19 09:30:10 +08:00
[fix] Judge fixed#128
This commit is contained in:
parent
c02ad316fc
commit
7467b9f2bf
@ -51,16 +51,19 @@ class Judge
|
|||||||
// 获取任务
|
// 获取任务
|
||||||
$case_id = self::caseObtain();
|
$case_id = self::caseObtain();
|
||||||
self::caseCheck($case_id);
|
self::caseCheck($case_id);
|
||||||
self::setLock(1 * 60 + 5);
|
// 如果没有设置时间 就设置个默认时间 可能在一秒钟内处理完 所以 <=
|
||||||
return;
|
if (self::getLock() <= time()) {
|
||||||
|
self::setLock(1 * 60 + 5);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
$case = array_pop(self::$wait_case);
|
$case = array_pop(self::$wait_case);
|
||||||
self::vote($case['id'], $case['vote']);
|
self::vote($case['id'], $case['vote']);
|
||||||
|
// 如果没有设置时间 就设置个默认时间 可能在一秒钟内处理完 所以 <=
|
||||||
|
if (self::getLock() <= time()) {
|
||||||
|
self::setLock(mt_rand(15, 30) * 60);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// 如果没有设置时间 就设置个默认时间 可能在一秒钟内处理完 所以 <=
|
|
||||||
if (self::getLock() <= time()) {
|
|
||||||
self::setLock(mt_rand(15, 30) * 60);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user