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