Closed fighterii closed 3 years ago
The underlying API client library makes a call every second to check the upload status. For me it was taking 4 or 5 seconds for each upload to complete, so you're right that it does make an unnecessarily large number of API calls per upload really. I thought about trying to monkey patch the library to change that and preserve API calls, but in the end decided it probably wasn't worth the effort, and I could tolerate just waiting a bit longer for the script to complete.
You're right about the race condition/duplicate callback thing too. Couldn't quite work out exactly why it was happening, but I think something to do with the underlying API client library being originally designed to use callbacks but also now supporting Promises, which is the interface I preferred. Again, it didn't seem to affect the correct behaviour of the script so I didn't think it was important enough to spend more time trying to resolve.
Hey,
first of all - thank you for your work.
I have a question: How many API Calls are necessary for a successful upload?
I got the following output:
seems like apprx. 4-5 api calls per file are made? And why those duplicate callbacks when its the first time i started the script?
I had several approches to get the process started within Visual Studio Code, but the internal terminal didn't supported the prompts, so the process got stuck and i terminated them. Then i started via cmd one process and it worked - but with the output that seems to have some race conditions/multiple api calls? Is this just something i observe?
=> workout 2014-02-13 10_16_44.0.tcx is file 37; get the processed OK! message and shortly after gets the duplicate callback,