作者 lyh
... ... @@ -105,6 +105,8 @@ class HtmlLanguageCollect extends Command
if($html == '0'){
$collect_info->status = CollectTask::STATUS_FAIL;
$collect_info->save();
echo 'date:' . date('Y-m-d H:i:s') . ', project_id: ' . $project_id . ', collect_id: ' . $collect_id . ', error: no html' . PHP_EOL;
sleep(2);
return true;
}
... ... @@ -118,6 +120,7 @@ class HtmlLanguageCollect extends Command
$collect_info->save();
echo 'date:' . date('Y-m-d H:i:s') . ', project_id: ' . $project_id . ', collect_id: ' . $collect_id . ', error: ' . $e->getMessage() . PHP_EOL;
sleep(2);
return true;
}
... ... @@ -130,6 +133,7 @@ class HtmlLanguageCollect extends Command
//关闭数据库
DB::disconnect('custom_mysql');
sleep(2);
return true;
}
... ...
... ... @@ -443,7 +443,7 @@ class ProjectUpdate extends Command
return $task_id;
}
$task_list = UpdateLog::where('project_id', 528)->where('status', UpdateLog::STATUS_UN)->orderBy('project_id', 'asc')->orderBy('sort', 'asc')->limit(7)->get();
$task_list = UpdateLog::where('project_id', 543)->where('status', UpdateLog::STATUS_UN)->orderBy('project_id', 'asc')->orderBy('sort', 'asc')->limit(7)->get();
if ($task_list->count() == 0) {
return false;
}
... ...