Cleanup: Automated data retention system

Đang mở
#1,183 0 bình luận 0 reaction 1 người được giao Xem trên GitHub

@Prajna1999 đang làm issue này rồi.

Từ ngày 4/9/2026.

Đánh giá

Issue này chưa được đánh giá.

Mô tả

Is your feature request related to a problem?
We need a system to automatically clean up query and response data in the LLM calls table after a specified retention period. Without this, the database may become cluttered and inefficient.

Describe the solution you'd like

  • Implement a cron job to purge query/response data after a configurable retention window (default 1 week).
  • Handle one-time backlog separately from regular cron operations.
  • Write a cleanup strategy document detailing cron design, batching, and backlog handling.
  • Conduct a staging load test by duplicating ~20k LLM call rows ~5x in the copy_dev database to measure cleanup time. Do not use production data.
  • Ensure S3 cleanup is managed separately and not included in the DB cron/migration code.
Original issue

Context

query + response data in the LLM calls table will be cleaned up via a cron job after a configurable retention window (starting with 1 week).

A step-by-step cleanup strategy doc is to be written (cron design, batching, one-time backlog handling).

Scope / Acceptance criteria

  • Cron job to purge query/response data in the LLM calls table after a configurable retention window (default 1 week).
  • Handle one-time backlog separately from steady-state cron.
  • Write cleanup strategy doc (cron design, batching, backlog).
  • Staging load test: reuse the empty copy_dev database, duplicate staging's ~20k LLM call rows ~5x to reach ~1 lakh, and measure cleanup time. Do NOT pull prod data.
  • Keep S3 cleanup separate — do not bundle S3 deletion into the DB cron/migration code.

Notes

  • Guardrails input/output data is retained separately (anonymized, tagged as product enhancement) and is NOT part of this cleanup.
Ngôn ngữ chính
Python
Star
18
Fork
10
Merge trung bình
2 ngày 20 giờ
Pull request đã merge (30 ngày)
14

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của ProjectTech4DevAI/kaapi-backend

Tất cả issue của ProjectTech4DevAI/kaapi-backend

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.