Background Job
백그라운드 작업
백그라운드 작업은 서버가 페이지나 API 응답과 별개로 실행하는 작업으로, 작업을 시작할 수 있습니다. 응답은 작업이 끝나기 전에 완료될 수 있습니다.
accepted request -> persisted job ID -> runner attempt -> terminal result; bounded retryGET /jobs/job_482accepted request -> persisted job ID -> runner attempt -> terminal result; bounded retryJOB다른 예시
보고서 요청은 작업 `report-204`를 생성하고 상태 링크로 응답합니다. Kubernetes 작업은 보고서를 성공할 때까지 또는 재시도 한도에 도달할 때까지 실행하고, 최종 상태를 기록한 후 중지됩니다.
주요 부분
- 01작업 ID 및 저장된 입력
- 02승인되었거나 대기 상태
- 03실행기 및 시도
- 04진행 또는 하트비트
- 05성공 또는 실패 상태
- 06결과 및 복구 경로
사용할 때
느린 작업이 사용자가 응답을 받은 후 완료될 수 있을 때는 백그라운드 작업을 사용하십시오. 입력, 식별, 상태 및 최종 결과를 저장하십시오.
다음 경우에는 사용하지 마세요
결과가 지금 필요한 답변에는 사용하지 마세요. 실행기는 실패한 작업을 다시 시도할 수 있습니다. 요금, 이메일 또는 기타 효과를 반복하기 전에 안전 규칙을 추가하세요.
코드에서 사용된 이름
accepted request -> persisted job ID -> runner attempt -> terminal result; bounded retry 출시하기 전에
Check contracts and invariants, authorization, and input limits. Test retries, one-time effects, timeouts, and partial failures. Verify data integrity, compatibility, monitoring, recovery, and rollback.
Outcome:Complete the task with 백그라운드 작업 (Background Job)。 User context:보고서 요청은 작업 `report-204`를 생성하고 상태 링크로 응답합니다. Kubernetes 작업은 보고서를 성공할 때까지 또는 재시도 한도에 도달할 때까지 실행하고, 최종 상태를 기록한 후 중지됩니다. Technical concept or control:백그라운드 작업 (Background Job)。 Why it fits:느린 작업이 사용자가 응답을 받은 후 완료될 수 있을 때는 백그라운드 작업을 사용하십시오. 입력, 식별, 상태 및 최종 결과를 저장하십시오. Do not use it when:결과가 지금 필요한 답변에는 사용하지 마세요. 실행기는 실패한 작업을 다시 시도할 수 있습니다. 요금, 이메일 또는 기타 효과를 반복하기 전에 안전 규칙을 추가하세요. Engineering requirements: Define inputs, outputs, contracts, and rules that must always hold. Set authorization and input checks. Define failures, timeouts, retries, one-time effects, data moves, and compatibility limits. Operations: Add useful signals and logs that hide sensitive data. Set capacity limits and write an operator guide. Test recovery and rollback. Acceptance criteria: Contract and failure-path tests pass. Data and authorization rules still hold during retries and partial failures. Check performance limits, monitoring, recovery, and rollback. Evidence and limits (evidence boundary):하나의 공식 표준이 전체 용어를 통제하지 않음. 의미는 팀, 플랫폼 또는 프레임워크마다 달라질 수 있음. Unknowns to confirm: Where the code runs, data stores, traffic shape, consistency needs, and the security boundary. Also confirm the compatibility period, service goals, and rollback limits.
이 요청을 확인하세요
Review how 백그라운드 작업 (Background Job) is used now. Definition: 백그라운드 작업은 서버가 페이지나 API 응답과 별개로 실행하는 작업으로, 작업을 시작할 수 있습니다. 응답은 작업이 끝나기 전에 완료될 수 있습니다. Release checks: Check contracts and invariants, authorization, and input limits. Test retries, one-time effects, timeouts, and partial failures. Verify data integrity, compatibility, monitoring, recovery, and rollback. Before changing code, list the evidence, gaps, severity, and the smallest safe fix.