|
...
|
...
|
@@ -147,16 +147,16 @@ class HtmlCollect extends Command |
|
|
|
return $task_id;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!Cache::add('html_collect_select_mysql', true, 10)) {
|
|
|
|
// 如果存在数据锁,则表示有其他进程正在查询数据库,直接返回
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
$update_log_list = UpdateLog::where('status', UpdateLog::STATUS_COM)->where('collect_status', UpdateLog::COLLECT_STATUS_UN)->orderBy('updated_at', 'asc')->limit(20)->get();
|
|
|
|
if ($update_log_list->count() == 0) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!Cache::add('html_collect_select_mysql', true, 10)) {
|
|
|
|
//如果存在数据锁,表示有其他进程已往下执行,当前进程直接返回
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
foreach ($update_log_list as $update_log) {
|
|
|
|
switch ($update_log->api_type) {
|
|
|
|
case 'page':
|
...
|
...
|
|