I am having trouble figuring out the right way to address this issue I am having with one of my apps.
I loop over some files and create some worker threads (just a few threads) to upload files to Dropbox using files_upload. This works well except some small percentage of time some users report some files don't get uploaded. There must be some hiccup in the network connection and files_upload hangs somewhere in urllib3 or dropbox maybe? I can sort of reproduce this by disconnecting my wifi during an upload for a few seconds, then reconnecting. If the connection isn't restablished after a certain period of time files_upload returns some how because my threads are freed but the code after my files_upload call never runs and the exception is never thrown/caught. I am using the ApiError exception.
Anyways, is there a proper way to handle this from the Dropbox API perspective? Or is this just Python and urllib3?