作者 lyh

修改脚本设置

@@ -76,8 +76,7 @@ class VideoTask extends Command @@ -76,8 +76,7 @@ class VideoTask extends Command
76 if ($sub_task_num <= 0){ 76 if ($sub_task_num <= 0){
77 break; 77 break;
78 } 78 }
79 -// $task_project = KeywordVideoTask::where(['status' => KeywordVideoTask::STATUS_OPEN])->orderBy('sort', 'desc')->orderBy('id', 'desc')->first();  
80 - $task_project = KeywordVideoTask::where(['project_id' => 895])->orderBy('sort', 'desc')->orderBy('id', 'desc')->first(); 79 + $task_project = KeywordVideoTask::where(['status' => KeywordVideoTask::STATUS_OPEN])->orderBy('sort', 'desc')->orderBy('id', 'desc')->first();
81 if (empty($task_project)){ 80 if (empty($task_project)){
82 break; 81 break;
83 } 82 }
@@ -261,7 +260,6 @@ class VideoTask extends Command @@ -261,7 +260,6 @@ class VideoTask extends Command
261 } 260 }
262 }else{ 261 }else{
263 $product_all_id = Product::where('thumb','!=',null)->where("status",Product::STATUS_ON)->inRandomOrder()->take(20)->pluck('id')->toArray(); 262 $product_all_id = Product::where('thumb','!=',null)->where("status",Product::STATUS_ON)->inRandomOrder()->take(20)->pluck('id')->toArray();
264 - @file_put_contents(storage_path('logs/lyh_error.log'), var_export($product_all_id, true) . PHP_EOL, FILE_APPEND);  
265 $products = Product::whereIn("id", $product_all_id)->orderByRaw(DB::raw("FIELD(id, " . implode(',', $product_all_id) . ")"))->get(); 263 $products = Product::whereIn("id", $product_all_id)->orderByRaw(DB::raw("FIELD(id, " . implode(',', $product_all_id) . ")"))->get();
266 } 264 }
267 $data = []; 265 $data = [];