From 50c056587c92b1a48115e1c6ccf8800c1c113bcf Mon Sep 17 00:00:00 2001 From: Justin Lee Date: Tue, 6 Feb 2018 09:31:09 -0500 Subject: [PATCH] Filter events on server side, in order to decrease load on Marathon (#541) (#544) * Filter events on server side, in order to decrease load on Marathon * Use lightweight Marathon events. --- marathon_lb.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/marathon_lb.py b/marathon_lb.py index 6a54b45d..170f98a5 100755 --- a/marathon_lb.py +++ b/marathon_lb.py @@ -226,7 +226,10 @@ def tasks(self): return self.api_req('GET', ['tasks'])["tasks"] def get_event_stream(self): - url = self.host + "/v2/events" + url = self.host + "/v2/events?plan-format=light&" + \ + "event_type=status_update_event&" + \ + "event_type=health_status_changed_event&" + \ + "event_type=api_post_event" return CurlHttpEventStream(url, self.__auth, self.__verify) def iter_events(self, stream):