crowd.dev icon indicating copy to clipboard operation
crowd.dev copied to clipboard

Optimize DevTo integration to prevent excessive reparsing

Open garrrikkotua opened this issue 2 years ago • 0 comments

Changes proposed ✍️

What

🤖 Generated by Copilot at 499360d

This pull request enhances the devto integration by optimizing the processArticleStream function to filter out stale or cached articles and avoid unnecessary processing. It also fixes a type error in the ctx.publishData function call. ​

🤖 Generated by Copilot at 499360d

To process a stream of articles We added some checks and particles We skip the old ones And cache the new ones And fix the type error in publishData

Why

How

🤖 Generated by Copilot at 499360d

  • Modify getDevToArticle function to return cache status of article (link)
  • Add logic to processArticleStream function to skip processing articles with old comments and valid cache, unless onboarding (link)
  • Update processArticleStream function to pass only article data to ctx.publishData function (link)

Checklist ✅

  • [ ] Label appropriately with Feature, Improvement, or Bug.
  • [ ] Add screehshots to the PR description for relevant FE changes
  • [ ] New backend functionality has been unit-tested.
  • [ ] API documentation has been updated (if necessary) (see docs on API documentation).
  • [ ] Quality standards are met.

garrrikkotua avatar Jul 27 '23 15:07 garrrikkotua