1
This commit is contained in:
parent
9419854775
commit
21587f7c37
@ -36,6 +36,7 @@ class MatchController extends BaseAuthedController {
|
|||||||
if ($matchOkDb) {
|
if ($matchOkDb) {
|
||||||
$this->refreshKeyExpire($r, MATCH_OK_KEY . $teamUuid, 1000*600);
|
$this->refreshKeyExpire($r, MATCH_OK_KEY . $teamUuid, 1000*600);
|
||||||
$this->refreshKeyExpire($r, MATCH_OK_KEY . $matchOkDb['target_team'], 1000*600);
|
$this->refreshKeyExpire($r, MATCH_OK_KEY . $matchOkDb['target_team'], 1000*600);
|
||||||
|
$this->refreshKeyExpire($r, TEAMID_KEY . $matchOkDb['target_team'], 1000*600);
|
||||||
} else {
|
} else {
|
||||||
$currMatchDb = $this->readCurrMatchTeam($r);
|
$currMatchDb = $this->readCurrMatchTeam($r);
|
||||||
if (empty($currMatchDb)) {
|
if (empty($currMatchDb)) {
|
||||||
@ -72,7 +73,7 @@ class MatchController extends BaseAuthedController {
|
|||||||
if (empty($teamDbStr)) {
|
if (empty($teamDbStr)) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
$r->refreshKeyExpire($r, TEAMID_KEY . $teamUuid, 1000*600);
|
$this->refreshKeyExpire($r, TEAMID_KEY . $teamUuid, 1000*600);
|
||||||
$teamDb = json_decode($teamDbStr, true);
|
$teamDb = json_decode($teamDbStr, true);
|
||||||
return $teamDb;
|
return $teamDb;
|
||||||
}
|
}
|
||||||
@ -117,7 +118,25 @@ class MatchController extends BaseAuthedController {
|
|||||||
|
|
||||||
private function matchOk($r, $teamUuid, $currMatchDb)
|
private function matchOk($r, $teamUuid, $currMatchDb)
|
||||||
{
|
{
|
||||||
|
{
|
||||||
|
$r->del(MATCH_CURRENT_TEAM_KEY);
|
||||||
|
}
|
||||||
|
{
|
||||||
|
$matchOkDb = array(
|
||||||
|
'target_team' => $currMatchDb['current_team'],
|
||||||
|
'match_time' => $this->_getNowTime()
|
||||||
|
);
|
||||||
|
$r->set(MATCH_OK_KEY . $teamUuid, json_encode($currMatchDb));
|
||||||
|
$this->refreshKeyExpire($r, MATCH_OK_KEY . $teamUuid, 1000*600);
|
||||||
|
}
|
||||||
|
{
|
||||||
|
$matchOkDb = array(
|
||||||
|
'target_team' => $teamUuid,
|
||||||
|
'match_time' => $this->_getNowTime()
|
||||||
|
);
|
||||||
|
$r->set(MATCH_OK_KEY . $currMatchDb['current_team'], json_encode($currMatchDb));
|
||||||
|
$this->refreshKeyExpire($r, MATCH_OK_KEY . $currMatchDb['current_team'], 1000*600);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user