Persistent Job Queue & Maintenance Worker for backend
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- docker, go
- Lĩnh vực
- backend, databases, documentation
Hướng nghiên cứu
Bắt đầu bằng cách xác định Go JobStore và entry point NewJobQueue, sau đó xem xét cách backend sử dụng Docker volume tại /app/data và các biến môi trường trong .env. Xác định cơ chế persistence cho các job đang chờ, đang xử lý, đã hoàn thành và thất bại, cơ chế cleanup theo lịch và việc recovery sau khi khởi động; cập nhật Backend README với cách hoạt động của database, cron và các biến môi trường.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Is your feature request related to a problem? Please describe.
The current job queue is volatile. If the backend container crashes or restarts, all queued tasks are lost forever. This needs to be persistent, so that occasional backend downtimes do not affect the Jobs. Additionally, as we implement persistence, we need a way to manage the lifecycle of the "Success" and "Failure" logs stored in the database to prevent unbounded disk usage.
Describe the solution you'd like
-
Implement a disk-backed queue using
bbolt(or something similar, open to suggestions) and an internal Go-based cron scheduler for maintenance.- The Queue will work as a database that will store all Jobs from the JobStore.
-
Persistence Layer (bbolt)
- Store the database file at /app/data/queue.db to use the existing Docker volume.
- Job States: Implement buckets or tables for Pending, In-Progress (doubt if it should exist, perhaps Pending, Completed, and Failed should suffice for our use case), and Completed statuses.
- Reliability: On startup, a NewJobQueue function must scan the Pending and In-Progress buckets and re-insert those jobs into the channel. Upon completion, mark them as completed.
-
Scheduled Maintenance (Cron)
- Integrate a package like robfig/cron/v3 to handle periodic tasks without external dependencies.
- Cleanup Job: Runs every 24 hours (or at midnight). Add that CRON parameter as an optional variable in .env file. Users might want to customise, but having a default value is nice, as well.
- Logic: Deletes all entries from the Completed or Failed buckets that are older than 7 days.
Additional context
Need to take into account the amount of storage that database will cost. And hence optimise it further. Documentation, related to the changes, related to env vars, and cron job along with the Database need to be added, to the Backend README. The current functionality should not be affected/broken.
- The issue is open to all for their versions of implementations.
Links:
https://github.com/etcd-io/bbolt
https://github.com/robfig/cron
- Ngôn ngữ chính
- TypeScript
- Star
- 37
- Fork
- 76
- Merge trung bình
- 3 ngày 7 giờ
- Pull request đã merge (30 ngày)
- 2
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của CCExtractor/ccsync
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
CCExtractor/ccsync#473 · 1 bình luận ·
-
GET /tasks is not serialized and Taskwarrior data isolation may race through shared /root/.taskĐang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
CCExtractor/ccsync#471 · 3 bình luận ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
CCExtractor/ccsync#440 · 3 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
CCExtractor/ccsync#433 · 2 bình luận ·
-
enhancement frontend
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 48/100
CCExtractor/ccsync#425 ·
Tất cả issue của CCExtractor/ccsync
Issue tương tự
-
[Bug] The shared instance selector's placeholder and no-match text ignore the display languageCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 90/100
apache/rocketmq-dashboard#5561 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
CopilotKit/OpenDots#69 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
sendDefaultPii is reported as deprecated on ReactNativeOptions although dataCollection is hiddenĐang mởBug React-Native Waiting for: Product Owner
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
getsentry/sentry-react-native#6830 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
OSCI'26
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
GauravKarakoti/SecureFlow#1215 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[quality] bundle e2e never drives plain /close or the /milestone refusals through dist/index.jsCó thể đã có người làm @hivecommons-hive đã nhận hôm nay. Đang mởagent/quality hive/covered-by-pr hive/hosted-available-lke648397-260827-5q9t kind/cleanup quality testing
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
cncf/prow-github-actions#295 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày