You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by GitBox <gi...@apache.org> on 2022/06/01 15:30:52 UTC

[GitHub] [incubator-devlake] klesh opened a new issue, #2052: Refactor api_collector and unit test

klesh opened a new issue, #2052:
URL: https://github.com/apache/incubator-devlake/issues/2052

   ## What and why to refactor
   Now,  `api_collector` have reached around 500 lines of code, and the logic is complicated as hell, we have many places with code like the following to support canceling and avoid deadlock:
   ![image](https://user-images.githubusercontent.com/61080/171440404-fc729fc2-bb84-49e5-8d32-f78dbb85d9c8.png)
   ![image](https://user-images.githubusercontent.com/61080/171440500-c75df311-6d3c-44fc-ad76-0b8a0253bc8c.png)
   Which is not only hard to understand but also hard to maintain, I don't think anyone would ever enjoy debugging this mess.
   
   ## Describe the solution you'd like
   1. Unify different techniques to avoid deadlock, and named this method `NextTick`
   2. Move `NextTick` to `api_async_client` or `worker_scheduler`
   3. Design UnitTests to make sure `NextTick` is adopted by different kinds of APIs
   
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@devlake.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-devlake] klesh closed issue #2052: Refactor api_collector and unit test

Posted by GitBox <gi...@apache.org>.
klesh closed issue #2052: Refactor api_collector and unit test
URL: https://github.com/apache/incubator-devlake/issues/2052


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org