作者 刘锟

update

... ... @@ -221,7 +221,7 @@ class UpdateSeoTdk extends Command
while (true) {
$task = ProjectUpdateTdk::getPendingTask();
if (!$task) {
sleep(10);
sleep(60);
continue;
}
$project_id = $task->project_id;
... ...
... ... @@ -54,12 +54,12 @@ class ProjectUpdateTdk extends Base
$project_id = Redis::rpop('updateSeoTdk');
$data = [];
if($project_id){
$data = self::where('status', self::STATUS_PENDING)->where('project_id', $project_id)->orderBy('id', 'asc')->first();
$data = self::select(['id','project_id'])->where('status', self::STATUS_PENDING)->where('project_id', $project_id)->orderBy('id', 'asc')->first();
}
if($data){
return $data;
}
return self::where('status', self::STATUS_PENDING)->orderBy('id', 'asc')->first();
return self::select(['id','project_id'])->where('status', self::STATUS_PENDING)->orderBy('id', 'asc')->first();
}
/**
... ...