From 286c87f2db13778ffb5f8a89e4308f558c071d81 Mon Sep 17 00:00:00 2001 From: Imri Goldberg Date: Sun, 16 Jul 2017 11:30:02 +0000 Subject: [PATCH] Merged in bugfix/speed_increase (pull request #24) * small fix that significantly speeds up work with alerts Approved-by: Yochai Blumenfeld --- mazerunner/api_client.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mazerunner/api_client.py b/mazerunner/api_client.py index 41882b9..7ff6aae 100644 --- a/mazerunner/api_client.py +++ b/mazerunner/api_client.py @@ -9,6 +9,7 @@ from mazerunner.exceptions import ValidationError, ServerError, BadParamError, \ InvalidInstallMethodError +ALERTS_PER_PAGE = 500 class BaseCollection(object): MODEL_CLASS = None @@ -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): """