feat(seo): 사이트맵 재생성 진행상황 + 실시간/폴링 UI
관리자 "전체 재생성"을 큐(Full 모드)로 던지고 진행상황을 SEO 탭에서 확인한다. Reverb ON 이면 방송 채널 구독으로 실시간 갱신, OFF 면 상태 API 폴링으로 폴백한다. - SitemapProgress 진행상황 스토어(queued→running→writing→completed/failed, 캐시 TTL 3600, 방송 스로틀) + SitemapManager.getStatus 확장(progress + realtime_enabled) - GET /api/admin/seo/sitemap/status(core.settings.read) 신규 - 관리자 재생성을 항상 Full 모드로 큐잉 + 진행률 기록, Job 최종 실패 시 progress=failed 고정 - core.admin.seo.sitemap 방송 채널 인증(core.settings.read) - SEO 탭 진행상황 UI(상태 배지/단계/누적 URL/실시간·폴링 안내) + 폴링 분기 - 재생성 중 누적 URL 표기(replaceAllForContributor 삽입 건수 반환 — count 쿼리 없이 스트림 누적) - ja 언어팩 진행상황 UI 번역 동기화
This commit is contained in:
1 parent
1629684156
commit
face022073
29 files changed
+1145
-83
No files matched your search
@@ -92,7 +92,7 @@ class SitemapUrlRepository implements SitemapUrlRepositoryInterface
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function replaceAllForContributor(string $contributor, iterable $entries): void
|
||||
public function replaceAllForContributor(string $contributor, iterable $entries): int
|
||||
{
|
||||
// 기여자 스코프 전량 제거 후 청크 삽입. 대용량(수백만) 삽입을 단일 트랜잭션으로
|
||||
// 감싸면 락/메모리 부담이 크므로, 삭제 후 청크별 삽입으로 유계 메모리를 유지합니다.
|
||||
@@ -100,6 +100,7 @@ class SitemapUrlRepository implements SitemapUrlRepositoryInterface
|
||||
|
||||
$now = now();
|
||||
$batch = [];
|
||||
$inserted = 0;
|
||||
foreach ($entries as $entry) {
|
||||
$batch[] = $this->toRow(
|
||||
(string) ($entry['resource_type'] ?? 'unknown'),
|
||||
@@ -113,13 +114,17 @@ class SitemapUrlRepository implements SitemapUrlRepositoryInterface
|
||||
|
||||
if (count($batch) >= self::INSERT_CHUNK) {
|
||||
SitemapUrl::insert($batch);
|
||||
$inserted += count($batch);
|
||||
$batch = [];
|
||||
}
|
||||
}
|
||||
|
||||
if ($batch !== []) {
|
||||
SitemapUrl::insert($batch);
|
||||
$inserted += count($batch);
|
||||
}
|
||||
|
||||
return $inserted;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user