filhodanuvem / polyglot

What are your favorite programming languages? 👅

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Incorrect/inconsistent values because of the async method

renatosuero opened this issue · comments

if you to run 2x the same user you will have different result. I was checking and in my user I start 8 goroutines here to process the repos but only 4 is processed here

Screenshot 2021-02-12 at 13 56 23

I've changed the code and now it looks ok, you can see here:
Screenshot 2021-02-12 at 14 00 21

I'd like to write tests but because of this function, it do a lot of things and I don't see a way to do that without change the code otherwise the test will have to create the files and add a validation to avoid download if the folder is available for example, I'd like to know what do you think @filhodanuvem

PS. I didn't create a PR, because maybe I'm missing something and the change isn't necessary

Great job @renatosuero, not sure if it was a huge change but please send the PR. I've noticed that the result was different in the past but I thought it was because of the limit of repos that polyglot analyses somehow. So for sure there is a bug here.