mirror of
https://github.com/elyby/accounts.git
synced 2024-12-24 22:29:51 +05:30
Increase cleanup timout for minecraft access tokens
This commit is contained in:
parent
29fc267148
commit
6c4ce8cb8d
@ -1,6 +1,7 @@
|
||||
<?php
|
||||
namespace console\controllers;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use common\models\AccountSession;
|
||||
use common\models\EmailActivation;
|
||||
use common\models\MinecraftAccessKey;
|
||||
@ -32,7 +33,7 @@ class CleanupController extends Controller {
|
||||
|
||||
public function actionMinecraftSessions(): int {
|
||||
$expiredMinecraftSessionsQuery = MinecraftAccessKey::find()
|
||||
->andWhere(['<', 'updated_at', time() - 1209600]); // 2 weeks
|
||||
->andWhere(['<', 'updated_at', Carbon::now()->subMonths(3)->getTimestamp()]);
|
||||
|
||||
foreach ($expiredMinecraftSessionsQuery->each(100, Yii::$app->unbufferedDb) as $minecraftSession) {
|
||||
/** @var MinecraftAccessKey $minecraftSession */
|
||||
|
Loading…
Reference in New Issue
Block a user