models/Comment.php
public function afterSave($insert, $changedAttributes)
    {
        if ($insert) {
            //开始机器审核
            Yii::$app->queue->push(new ScanTextJob([
                'modelClass' => get_class($this), 'modelId' => $this->id, 'scenario' => 'new', 'category' => 'comment'
            ]));
        }
        return parent::afterSave($insert, $changedAttributes);
    }
public function afterSave($insert, $changedAttributes)
    {
        if ($insert) {
            //开始机器审核
            Yii::$app->queue->push(new ScanTextJob([
                'modelClass' => get_class($this), 'modelId' => $this->id, 'scenario' => 'new', 'category' => 'comment'
            ]));
        }
        return parent::afterSave($insert, $changedAttributes);
    }
保存后机器审核
@param bool $insert
@param array $changedAttributes