mirror of
https://github.com/elyby/accounts.git
synced 2024-11-26 16:52:02 +05:30
Оптимизировано потребление памяти для выборки email_actions на зачистку
This commit is contained in:
parent
9a38481f7d
commit
d7b193f2e7
@ -17,8 +17,8 @@ class CleanupController extends Controller {
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @var EmailActivation[] $expiredEmails */
|
/** @var \yii\db\BatchQueryResult|EmailActivation[] $expiredEmails */
|
||||||
$expiredEmails = $query->andWhere($conditions)->all();
|
$expiredEmails = $query->andWhere($conditions)->each();
|
||||||
foreach ($expiredEmails as $email) {
|
foreach ($expiredEmails as $email) {
|
||||||
$email->delete();
|
$email->delete();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user