Skip to content

Commit

Permalink
Fix RWS's error 400 when starting ProxyService with more than 0 subs
Browse files Browse the repository at this point in the history
Sometimes RWS will get stuck and produce warnings about "invalid data".
Apparently, this can be caused by the fact that ProxyService starts by
sending the submissions/subchanges related data first, and then it will
proceed to the contests/teams/users related data. Now, if there are
already more than 0 submissions, this means that ProxyService will send
data about these submissions even though it has never initialized the
rankings.

This commit enqueues the initialization operation and *then* starts the
sweeper.
  • Loading branch information
wil93 authored and stefano-maggiolo committed Oct 2, 2015
1 parent 683b766 commit f3c624f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cms/service/ProxyService.py
Expand Up @@ -262,11 +262,12 @@ def __init__(self, shard, contest_id):
self.rankings = list()
for ranking in config.rankings:
self.add_executor(ProxyExecutor(ranking.encode('utf-8')))
self.start_sweeper(347.0)

# Send some initial data to rankings.
# Enqueue the dispatch of some initial data to rankings.
self.initialize()

self.start_sweeper(347.0)

def _missing_operations(self):
"""Return a generator of data to be sent to the rankings..
Expand Down

0 comments on commit f3c624f

Please sign in to comment.