cf-tool icon indicating copy to clipboard operation
cf-tool copied to clipboard

Handle delay in contest, properly

Open etanot opened this issue 4 years ago • 3 comments

Yesterday, Educational Round #87 delayed twice times by 10 then 5 minutes; I got this error message twice times, Cannot find any problem statis.

$ cf race 1354
Race CONTEST 1354
Countdown: 
Open https://codeforces.com/contest/1354
Open https://codeforces.com/contest/1354/problems
Parse CONTEST 1354
Cannot find any problem statis
$ cf race 1354
Race CONTEST 1354
Countdown: 
^C:05:29

I know this happened because cf-tool wasn't able to parse question, but isn't it a good idea to handle this case by checking whether contest has delayed? If yes, show proper message like "Contest has been delayed by 10 minutes" or something similar rather than showing above error message.

etanot avatar May 18 '20 12:05 etanot

Actually, what happens is, once countdown has been parsed from the site, countdown is run offline. This is ideally better than parsing the countdown every second from the site. In case of contest extensions, you'll have to break from the contest timer and restart the timer.

This is because countdown is fetched from a different page than the problems page

infalmo avatar May 18 '20 15:05 infalmo

countdown is fetched from a different page than the problems page

Isn't it a good idea to recheck countdown page, again when we encounter above error?

etanot avatar May 19 '20 02:05 etanot

It will be better to recheck the time every 25 seconds. This way users won't reach the rate limit and at the same time, the countdown will be almost synced!

the-redback avatar Jun 12 '20 12:06 the-redback