Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(worker): simplify job declaration #9 #40

Merged
merged 1 commit into from
Sep 29, 2024
Merged

Conversation

tuana9a
Copy link
Owner

@tuana9a tuana9a commented Sep 29, 2024

#9

thư viện xây dựng job cho worker hiện hơi khó dùng: nhiều abstraction và nó dần dần đang biến thành một ngôn ngữ lập trình mới -> re-invent the wheel, một vài tiêu chí mình đã note lại nếu tiếp tục theo hướng cũ

  • tăng thời gian dev, test vì là abstraction
  • tăng thời gian debug cũng vì là abstraction
  • lỗi tiềm ẩn, khó test
  • logic code dễ hiểu, nếu chỉ sử dụng thì không sao nhưng nếu phải dev và mở rộng thì rất khó -> tech debt

Do vậy mình quyết định cần phải làm đơn giản hơn việc viết một job đăng ký tự động mới

  • đọc code là biết luôn job đó làm những gì như nào, mọi thứ đều show hết ở trong một file
  • việc mở rộng hay phát triển mới rất đơn giản: cop ra file mới, sửa code js, các bạn chỉ cần biết code js và sử dụng các thư viện js là có thể mở rộng và cải thiện hệ thống

@tuana9a tuana9a merged commit 3dcea55 into main Sep 29, 2024
3 checks passed
@tuana9a tuana9a deleted the simplify-worker branch September 29, 2024 02:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant