MA3STR0 / kimsufi-crawler

Crawler that will send you an email alert as soon as servers on OVH/Kimsufi become available for purchase
MIT License
193 stars 60 forks source link

Added request timeout #34

Closed Zumochi closed 9 years ago

Zumochi commented 9 years ago

Added request timeout of 30 seconds because of timeout spam (most requests take about 15 seconds for me (from EU), so the current 10 is on the very low side. Thus 30 seconds to be safe :wink: ). Increased interval to check for availability from 10 to 30 seconds (have been getting some connection refused as well :disappointed: ) 15 + 30 still checks more than once a minute, that's more than plenty in my opinion.

Let me know if I did it right :smile: (not 100% sure about the config).

MA3STR0 commented 9 years ago

Thanks for your contribution. Good idea with request_timeout, please make it configurable in config.json with default of 20-30 sec and I will merge. No need to include changes in default config though, it is kept minimal to help users get script running quickly. Then everyone can look up details in the readme. Besides, there was a feedback that 10 seconds interval is not enough for KS-1 and some guys set it to 7. So no need to update defaults, keep things configurable and everyone will be happy :)

Zumochi commented 9 years ago

Do you mean I should keep the values out of the config, but allow the user to add the values themselves?

MA3STR0 commented 9 years ago

Thats better, thanks. Maybe I will update the default config later when I have more info

Zumochi commented 9 years ago

Cool, thanks for merging!