DOMjudge / domjudge

DOMjudge programming contest jury system
https://www.domjudge.org
GNU General Public License v2.0
712 stars 250 forks source link

Refresh eventfeed table #2329

Open vmcj opened 6 months ago

vmcj commented 6 months ago

Description of the enhancement request

Add a symfony command to recreate the eventfeed. The command is preferred over a button as this process can take a while.

The goal you want to achieve

Sometimes we fail in creating certain events (timeouts, errors etc.) or we have a very outdated eventfeed (demoweb). It would be beneficial if we can recreate the eventfeed and make sure that everything which has happened also did get the event.

nickygerritsen commented 6 months ago

This should be as 'easy' as:

But the state events are a bit interesting: since static events should not really matter and can come before any other event, we can first create all of these and then while looping over the other events, make sure to add the state event at the correct time.

meisterT commented 6 months ago

We need to drop all existing connections as well, right? Or at least add some form of synchronization mechanism...

nickygerritsen commented 6 months ago

We need to drop all existing connections as well, right? Or at least add some form of synchronization mechanism...

Yeah and have new event ID's, as in if a client users since=<token> with a token we don't know about, we should return a 400.

So we need some way of putting down somewhere when the feed was last reset. We could mis-use the config table for that or something else.