- Debugging trigger

parent 589d9ba1
...@@ -225,7 +225,8 @@ class Passing extends \common\components\ActiveRecordModel ...@@ -225,7 +225,8 @@ class Passing extends \common\components\ActiveRecordModel
{ {
parent::afterSave($insert, $changedAttributes); parent::afterSave($insert, $changedAttributes);
$this->initTriggerByTestFinish(['email' => Yii::$app->user->identity->email]); if ($this->status == self::ENDED)
$this->initTriggerByTestFinish(['email' => Yii::$app->user->identity->email]);
} }
/** /**
...@@ -240,7 +241,6 @@ class Passing extends \common\components\ActiveRecordModel ...@@ -240,7 +241,6 @@ class Passing extends \common\components\ActiveRecordModel
$count = TriggerCondition::find()->where(['trigger_id'=>$trigger->id])->count(); $count = TriggerCondition::find()->where(['trigger_id'=>$trigger->id])->count();
// Добавляем в расписание срабатывание триггера завершения теста только при условии что у оно триггера есть и оно там одно // Добавляем в расписание срабатывание триггера завершения теста только при условии что у оно триггера есть и оно там одно
if ($exists===true && $count==1) { if ($exists===true && $count==1) {
// var_dump('asd');
$init = $trigger->initAction($params); $init = $trigger->initAction($params);
if ($init===true) { if ($init===true) {
$curl = curl_init(); $curl = curl_init();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment