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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to