ScottyLabs / course-api

The new version of the Scheduling API, now with prerequisites, course descriptions, and more!
https://scottylabs.org/course-api/
MIT License
21 stars 14 forks source link

Better robustness regarding internet connection #47

Open nitsanshai opened 8 years ago

nitsanshai commented 8 years ago

More of an idea: since you're hitting the endpoint so many separate times, and since the script takes so long, it sucks when it fails for maybe a small disconnection because of the internet and none of the results you had accumulated so far get written. Maybe think about how to catch failures, maybe with exponential backoff on retries, and possibly after a certain amount of failures, save what the script has collected so far. Thoughts?

justingallagher commented 8 years ago

@yiblet Can you add this as part of your parallel code? You should be able to just add a try-catch around this line in aggregate.py, where you retry on failure a certain number of times before aborting.

yiblet commented 8 years ago

@justingallagher I already put in the pull request before I read this issue. I'll add on to it tomorrow