filter(Game.match_id==match_id).one()\r
# if a game under the same server and match_id found, \r
# this is a duplicate game and can be ignored\r
- raise pyramid.httpexceptions.HTTPOk\r
+ raise pyramid.httpexceptions.HTTPOk('OK')\r
except NoResultFound, e:\r
# server_id/match_id combination not found. game is ok to insert\r
session.add(game)\r
create_player_stats(session=session, player=player, game=game, \r
player_events=player_events)\r
\r
+ # update elos\r
+ try:\r
+ game.process_elos(session)\r
+ except Exception as e:\r
+ log.debug('Error (non-fatal): elo processing failed.')\r
+\r
session.commit()\r
log.debug('Success! Stats recorded.')\r
return Response('200 OK')\r