Surya1231 / ContestMania

A platform for tracking your competitive progress on various competitive coding websites.
https://contestmania.web.app
39 stars 8 forks source link

Sleep between codeforces getCfUserInfo requests #39

Closed MahmoudHamdy00 closed 2 years ago

MahmoudHamdy00 commented 2 years ago

Add 300ms delay between getCfUserInfo to avoid 503 Service Temporarily Unavailable when adding a lot of cf handles (+5) where codeforces API may be requested at most 1 time per two seconds

Reference: https://codeforces.com/apiHelp#:~:text=API%20may%20be%20requested%20at%20most%201%20time%20per%20two%20seconds

Note: It will also fail because 300ms is too small, but I think its the average to use around 10 handles

image

Surya1231 commented 2 years ago

Thank you so much for fixing it, I will need to sometime to release it