Skip to content
This repository has been archived by the owner on Dec 4, 2024. It is now read-only.

Commit

Permalink
Filter events on server side, in order to decrease load on Marathon (#…
Browse files Browse the repository at this point in the history
…541)

* Filter events on server side, in order to decrease load on Marathon
* Use lightweight Marathon events.
  • Loading branch information
Ivan Chernetsky authored and drewkerrigan committed Jan 29, 2018
1 parent f0c2433 commit 324b0a6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion marathon_lb.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 324b0a6

Please sign in to comment.