[feat] solution,postgres-init,docs: 생성 진행 상태 · 새로 만들기 존중 · 발행본 색인·파비콘
작업트리에 커밋되지 않은 채 쌓여 있던 것과, 오늘 찾은 문제 셋을 함께 담는다. ## 1. 콘텐츠 생성 진행 상태 (작업트리에 있던 것) COPY 잡의 실제 단계를 DB에 기록하고 응답으로 내보낸다. 폴링 횟수로 진행률을 흉내 내던 것을 걷어냈다. 새로고침·재접속해도 jobId 로 이어서 본다. - services/copy_steps.py · services/job_progress.py · common/job_errors.py (신규) - postgres-init/migrations/0013_job_progress.sql + init.sql - 프론트: useGenerationJob · generationLabels (신규), Step5Generating·pollJob 배선, orval 모델 갱신(jobProgress · jobStep · jobStepStatus · jobStepReason) - docs/GENERATION_FLOW.md (신규) ## 2. 발행된 사이트만 색인한다 실측(2026-09-15): 디스크의 발행본 33곳 중 **15곳이 draft 인데 `index, follow`** 였고 사이트맵에도 올라가 있었다. 사장님이 발행 버튼을 누른 적 없는 사이트가 짓다 만 상태로 구글에 실려 있었다는 뜻이다. head.ts 가 robots 를 하드코딩하고 payload 의 `site.status` 를 보지 않았다. "색인을 막을 이유가 없다"는 주석은 굽는 것이 곧 발행이던 시절의 말인데, 지금은 빌더 미리보기만 눌러도 draft 로 구워진다. - seo/head.ts: PUBLISHED 일 때만 index, 아니면 `noindex, follow` - 사이트맵·`/s` 목록·llms.txt 에서도 함께 빠진다 — 그쪽은 구운 HTML 의 robots 를 읽어 거른다(seo/directory.ts readBakedNoindex). 규칙을 두 자리에 두지 않으려고 한 곳에 뒀다 ## 3. [새로 크롤링하고 사이트 생성하기] 를 뒤집지 않는다ba90a19의 중복 합치기가 **일부러 다시 만들려는 경우까지** 기존 사업장으로 끌고 갔다 — 새로 만들기를 눌렀는데 기존 에디터가 열린다(사장님 보고 2026-09-15). - Req_VerifyPlaceByUrl.reuse_existing (기본 True — 다른 호출자의 동작은 그대로) - place_service.verify_place_by_url: 끄면 이어붙이지 않는다. 다만 **비어 있는 중복 행은 계속 치운다** — 원래 막으려던 누적이 그것이고 빈 행은 잃을 것이 없다 - ensureServerPlace: 위저드는 새로 만들기 경로에서만 오므로 False 로 보낸다 ## 4. 발행본 파비콘 발행본에 파비콘 링크가 아예 없어 브라우저 탭에 기본 아이콘이 떴다. 파일은 오리진 루트의 공용 자산이라 사이트마다 복사하지 않고 루트 절대경로로 가리킨다. 검증: site vitest 84건 통과 · tsc(site·frontend) · eslint 통과. 백엔드 pytest 는 로컬 DB 비밀번호가 맞지 않아 돌리지 못했다(a5b8701과 같은 자리). 발행본 반영에는 전체 재굽기가 필요하다. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
4cd756108d
commit
079c93a62a
60 files changed
+1465
-596
No files matched your search
@@ -4,9 +4,11 @@
|
||||
* Web4Ai API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import type { JobDataPlaceId } from "./jobDataPlaceId";
|
||||
import type { JobType } from "./jobType";
|
||||
import type { JobStatus } from "./jobStatus";
|
||||
import type { JobDataResult } from "./jobDataResult";
|
||||
import type { JobDataProgress } from "./jobDataProgress";
|
||||
import type { JobDataLastError } from "./jobDataLastError";
|
||||
import type { JobDataRunAfter } from "./jobDataRunAfter";
|
||||
import type { JobDataRunStartedAt } from "./jobDataRunStartedAt";
|
||||
@@ -15,11 +17,13 @@ import type { JobDataUpdatedAt } from "./jobDataUpdatedAt";
|
||||
|
||||
export interface JobData {
|
||||
job_id: string;
|
||||
place_id?: JobDataPlaceId;
|
||||
job_type: JobType;
|
||||
status: JobStatus;
|
||||
attempts?: number;
|
||||
max_attempts?: number;
|
||||
result?: JobDataResult;
|
||||
progress?: JobDataProgress;
|
||||
last_error?: JobDataLastError;
|
||||
run_after?: JobDataRunAfter;
|
||||
run_started_at?: JobDataRunStartedAt;
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Web4Ai API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export type JobDataPlaceId = string | null;
|
||||
@@ -0,0 +1,9 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Web4Ai API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import type { JobProgress } from "./jobProgress";
|
||||
|
||||
export type JobDataProgress = JobProgress | null;
|
||||
@@ -0,0 +1,12 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Web4Ai API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import type { JobStep } from "./jobStep";
|
||||
|
||||
export interface JobProgress {
|
||||
steps: JobStep[];
|
||||
attempt: number;
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Web4Ai API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import type { JobStepStatus } from "./jobStepStatus";
|
||||
import type { JobStepReason } from "./jobStepReason";
|
||||
|
||||
export interface JobStep {
|
||||
id: string;
|
||||
status: JobStepStatus;
|
||||
reason?: JobStepReason;
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Web4Ai API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export type JobStepReason = string | null;
|
||||
@@ -0,0 +1,17 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Web4Ai API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export type JobStepStatus = (typeof JobStepStatus)[keyof typeof JobStepStatus];
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
||||
export const JobStepStatus = {
|
||||
pending: "pending",
|
||||
running: "running",
|
||||
done: "done",
|
||||
skipped: "skipped",
|
||||
failed: "failed",
|
||||
} as const;
|
||||
@@ -11,5 +11,5 @@
|
||||
★ 확인된 fact 만 근거로 쓴다. 근거가 없으면 생성하지 않는다(유료 호출조차 안 한다).
|
||||
*/
|
||||
export interface ReqStartCopy {
|
||||
[key: string]: unknown;
|
||||
resume?: boolean;
|
||||
}
|
||||
@@ -19,4 +19,6 @@
|
||||
*/
|
||||
export interface ReqVerifyPlaceByUrl {
|
||||
url?: string;
|
||||
/** 같은 가게를 이미 갖고 있을 때 그 사업장으로 이어붙일지. 기본 true. */
|
||||
reuse_existing?: boolean;
|
||||
}
|
||||
@@ -16,8 +16,16 @@ import type {JobData} from './generated/model';
|
||||
/** 잡 폴링 간격. 수집·빌드는 분 단위로 도는 작업이라 더 촘촘히 물어봐도 얻는 게 없다. */
|
||||
export const JOB_POLL_MS = 2000;
|
||||
|
||||
/** ★ 폴링 총 제한시간. 워커가 죽어 잡이 RUNNING 에 박제되면 여기서 끊는다 — 무한 폴링 금지. */
|
||||
export const JOB_POLL_TIMEOUT_MS = 3 * 60 * 1000;
|
||||
/**
|
||||
* ★ 폴링 총 제한시간. 워커가 죽어 잡이 RUNNING 에 박제되면 여기서 끊는다 — 무한 폴링 금지.
|
||||
*
|
||||
* ★ 실제 잡 시간보다 넉넉해야 한다. 3분이던 동안 정상적으로 끝난 발행이 '실패' 로 보였다 —
|
||||
* 실측(2026-09-15, 완료된 잡 전체): BUILD 최대 181s · VISION 최대 213s · SONG 최대 157s.
|
||||
* `publish=true` 는 노래·일정 생성을 빌드 안에서 **먼저** 돌리므로 더 길어진다.
|
||||
* 워커 쪽 상한은 JOB_DEADLINE_SEC(기본 900s)이니 화면이 그보다 먼저 접으면
|
||||
* 아직 도는 잡을 죽은 것으로 보고한다.
|
||||
*/
|
||||
export const JOB_POLL_TIMEOUT_MS = 10 * 60 * 1000;
|
||||
|
||||
/** ★ 연속 실패 허용치. 잠깐 끊긴 건 넘기고, 계속 실패하면 제한시간을 다 기다리지 않고 접는다. */
|
||||
export const JOB_MAX_POLL_ERRORS = 3;
|
||||
|
||||
Reference in new issue
Block a user