Closed pefoley2 closed 8 years ago
See https://github.com/tjcsl/ion/blob/master/intranet/apps/eighth/serializers.py#L124 The mix of database queries and python data manipulation is most likely responsible for the sporadic errors that occur during heavy load.
A possible solution would be to have activity_list and scheduled_activity_to_activity_map fall back to querying the db, if an indexerror would otherwise be raised.
collections.defaultdict would be useful.
See https://github.com/tjcsl/ion/blob/master/intranet/apps/eighth/serializers.py#L124 The mix of database queries and python data manipulation is most likely responsible for the sporadic errors that occur during heavy load.