作者 lyh

gx

@@ -95,7 +95,13 @@ class VideoTask extends Command @@ -95,7 +95,13 @@ class VideoTask extends Command
95 continue; 95 continue;
96 } 96 }
97 $logo_bg = $this->getImage($domainInfo); 97 $logo_bg = $this->getImage($domainInfo);
  98 + $num = $task_project->num;
98 foreach ($keyword as $val) { 99 foreach ($keyword as $val) {
  100 + if($sub_task_num == 0){
  101 + $task_project->num = $num;
  102 + $task_project->save();
  103 + break;
  104 + }
99 $log = KeywordVideoTaskLog::where(['project_id' => $task_project->project_id, 'keyword_id' => $val->id])->first(); 105 $log = KeywordVideoTaskLog::where(['project_id' => $task_project->project_id, 'keyword_id' => $val->id])->first();
100 if ($log){ 106 if ($log){
101 continue; 107 continue;
@@ -114,11 +120,7 @@ class VideoTask extends Command @@ -114,11 +120,7 @@ class VideoTask extends Command
114 'created_at' => date('Y-m-d H:i:s'), 120 'created_at' => date('Y-m-d H:i:s'),
115 ]; 121 ];
116 KeywordVideoTaskLog::insert($array); 122 KeywordVideoTaskLog::insert($array);
117 - $task_project->num--;  
118 - if($sub_task_num == 0){  
119 - $task_project->save();  
120 - break;  
121 - } 123 + $num--;
122 $sub_task_num--; 124 $sub_task_num--;
123 } 125 }
124 } 126 }