clear interval when different thread completes upload

I noticed that this interval was not being cleared when a different thread completed it's chunk, and the upload, but this interval us unaware the upload is done, keeps trying to get a chunk to upload.

Now it mirrors the code above that runs immediately, but this interval happens each second after that, and clears the intervals either when there is a chunk to process, or the upload is done.