Now there are 2 sub commands, deep for the previous code, and shallow for the new endpoints.
The download time for src-d is around 15m, and it takes around 500 API calls.
I chose to exit early when any error is found. The other alternative would be to log the error and continue, but I thought the errors we will find will probably be a broken internet connectivity, or the DB is down. In any of these, logging the errors and continue will just flood the logs with error messages and not really continue to do any work.
I will submit another incremental PR (#34) to get rid of all the FindOne DB calls for each individual issue and PR. But the time does not really improve, it seems most of the time is spent on the API calls.
Fix #30.
Now there are 2 sub commands,
deep
for the previous code, andshallow
for the new endpoints. The download time forsrc-d
is around 15m, and it takes around 500 API calls.I chose to exit early when any error is found. The other alternative would be to log the error and continue, but I thought the errors we will find will probably be a broken internet connectivity, or the DB is down. In any of these, logging the errors and continue will just flood the logs with error messages and not really continue to do any work.
I will submit another incremental PR (#34) to get rid of all the
FindOne
DB calls for each individual issue and PR. But the time does not really improve, it seems most of the time is spent on the API calls.