mirror of
https://github.com/elyby/accounts.git
synced 2025-05-31 14:11:46 +05:30
Улучшено логгирование метрик в statsd
This commit is contained in:
@@ -5,6 +5,7 @@ namespace common\tasks;
|
||||
use common\emails\EmailHelper;
|
||||
use common\emails\templates\ChangeEmailConfirmCurrentEmail;
|
||||
use common\models\confirmations\CurrentEmailConfirmation;
|
||||
use Yii;
|
||||
use yii\queue\RetryableJobInterface;
|
||||
|
||||
class SendCurrentEmailConfirmation implements RetryableJobInterface {
|
||||
@@ -36,6 +37,7 @@ class SendCurrentEmailConfirmation implements RetryableJobInterface {
|
||||
* @param \yii\queue\Queue $queue
|
||||
*/
|
||||
public function execute($queue) {
|
||||
Yii::$app->statsd->inc('queue.sendCurrentEmailConfirmation.attempt');
|
||||
$to = EmailHelper::buildTo($this->username, $this->email);
|
||||
$template = new ChangeEmailConfirmCurrentEmail($to, $this->code);
|
||||
$template->send();
|
||||
|
Reference in New Issue
Block a user