|
...
|
...
|
@@ -90,16 +90,16 @@ class GeneratePage extends Command |
|
|
|
*/
|
|
|
|
public function getTaskId()
|
|
|
|
{
|
|
|
|
$task_id = Redis::rpop('generate_page_id');
|
|
|
|
$task_id = Redis::rpop('generate_page');
|
|
|
|
if (empty($task_id)) {
|
|
|
|
$noticeModel = new NoticeLog();
|
|
|
|
$ids = $noticeModel->selectField(['status'=>0],'id');
|
|
|
|
$ids = $noticeModel->selectField(['status'=>0,'type'=>NoticeLog::GENERATE_PAGE],'id');
|
|
|
|
if(!empty($ids)){
|
|
|
|
foreach ($ids as $id) {
|
|
|
|
Redis::lpush('generate_page_id', $id);
|
|
|
|
Redis::lpush('generate_page', $id);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$task_id = Redis::rpop('generate_page_id');
|
|
|
|
$task_id = Redis::rpop('generate_page');
|
|
|
|
}
|
|
|
|
return $task_id;
|
|
|
|
}
|
...
|
...
|
|