-
Notifications
You must be signed in to change notification settings - Fork 280
Closed
Description
Latest commit from watchdog: gorakhargosh/watchdog@f3dfc4b
It means SendProblemsHandler.on_any_event
in monitor.py
would also trigger on_opened
. Judges need to trigger this to read test data and init file. This leads to supported-problems
being sent multiple times on every submission. Suppose there are n judges, bridged will receive at least 2 * n supported-problems
packets on each submission, which leads to 2n SQL update queries.
One simple fix is to add this line in SendProblemsHandler.on_any_event
.
def on_any_event(self, event):
if event.event_type == "opened":
return
if self.callback is not None:
self.callback()
if self.refresher is not None:
self.refresher.refresh()