sio2project / oioioi

GNU General Public License v3.0
160 stars 70 forks source link

Notification-sending fixes #311

Closed A-dead-pixel closed 5 months ago

A-dead-pixel commented 6 months ago

Resolves #263. Partially fixes #310 - initial results notifications are now sent for CE submissions, but unfortunately there is also a race condition: the notification may arrive to the notifications-server in the time window between oioioi generating the "My submissions" page and the user's browser connecting to the notif server. Then, the browser gets a page without the CE status, but doesn't receive a notification that there was a change.

Additionally, from the CE submissions' commit's message:

Move notification-sending logic to a separate function.
This also remedies a rare race condition, in which the user would get
a notification before the updated result is committed to the db.