Улучшено логгирование метрик в statsd

This commit is contained in:
ErickSkrauch
2018-01-02 20:45:04 +03:00
parent e3a99f04fe
commit c6d18f49e7
6 changed files with 16 additions and 7 deletions

View File

@@ -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();