Skip to content

Commit

Permalink
Merged in bugfix/speed_increase (pull request #24)
Browse files Browse the repository at this point in the history
* small fix that significantly speeds up work with alerts
Approved-by: Yochai Blumenfeld <yochaibl@gmail.com>
  • Loading branch information
Imri Goldberg committed Jul 16, 2017
1 parent 0ba3dcd commit 286c87f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion mazerunner/api_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
from mazerunner.exceptions import ValidationError, ServerError, BadParamError, \
InvalidInstallMethodError

ALERTS_PER_PAGE = 500

class BaseCollection(object):
MODEL_CLASS = None
Expand Down Expand Up @@ -869,7 +870,8 @@ def __init__(self, api_client, filter_enabled=False, only_alerts=False, alert_ty
def _get_query_params(self):
return dict(filter_enabled=self.filter_enabled,
only_alerts=self.only_alerts,
alert_types=self.alert_types)
alert_types=self.alert_types,
per_page=ALERTS_PER_PAGE)

def filter(self, filter_enabled=False, only_alerts=False, alert_types=None):
"""
Expand Down

0 comments on commit 286c87f

Please sign in to comment.