|
...
|
...
|
@@ -15,6 +15,7 @@ use App\Services\ProjectServer; |
|
|
|
use Illuminate\Console\Command;
|
|
|
|
use Illuminate\Support\Facades\Cache;
|
|
|
|
use Illuminate\Support\Facades\DB;
|
|
|
|
use Illuminate\Support\Facades\Redis;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 初始化项目
|
|
...
|
...
|
@@ -170,12 +171,12 @@ class UpdateSeoTdk extends Command |
|
|
|
$update[$table]['total_page']++;
|
|
|
|
$v = (array)$v;
|
|
|
|
|
|
|
|
//缓存 在处理的 项目 数据 id
|
|
|
|
//缓存 在处理的项目数据 id
|
|
|
|
$cache_key = "seo_tdk_{$project_id}_{$table}_{$v['id']}";
|
|
|
|
if(Cache::get($cache_key)){
|
|
|
|
if(!Redis::setnx($cache_key, 1)){
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
Cache::put($cache_key, 1, 120);
|
|
|
|
Redis::expire($cache_key, 120);
|
|
|
|
|
|
|
|
echo date('Y-m-d H:i:s') . '更新--' . $table . ': 项目id' . $project_id . ':id' . $v['id'] . PHP_EOL;
|
|
|
|
|
...
|
...
|
|