作者 李宇航

合并分支 'master-lyh-edit' 到 'master'

Master lyh edit



查看合并请求 !580
... ... @@ -119,10 +119,14 @@ class VideoTask extends Command
'updated_at' => date('Y-m-d H:i:s'),
'created_at' => date('Y-m-d H:i:s'),
];
KeywordVideoTaskLog::insert($array);
$rs = KeywordVideoTaskLog::insert($array);
@file_put_contents(storage_path('logs/lyh_error.log'), var_export($val->id, true) . PHP_EOL, FILE_APPEND);
if($rs){
$num--;
$sub_task_num--;
}
@file_put_contents(storage_path('logs/lyh_error.log'), var_export($num, true) . PHP_EOL, FILE_APPEND);
}
}
if($sub_task_num != 0){
$task_project->num = 0;
... ... @@ -184,10 +188,11 @@ class VideoTask extends Command
if(count($keyword_arr_id) == 0){
return [];
}
if(count($keyword_arr_id) < $number){
$number = count($keyword_arr_id);
}
if(count($keyword_arr_id) <= $number){
$keyword_id = array_rand($keyword_arr_id, count($keyword_arr_id));
}else{
$keyword_id = array_rand($keyword_arr_id, $number);
}
$keyword = Keyword::whereIn("id", $keyword_id)->get();
return $keyword;
}
... ...