Skip to content

Commit

Permalink
adds ignore_http1xx and forward compat kwargs to MarathonHealthCheck
Browse files Browse the repository at this point in the history
  • Loading branch information
mrtheb committed Jun 17, 2015
1 parent 93c8d8a commit de5c91a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion marathon/models/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,12 @@ class MarathonHealthCheck(MarathonObject):
:param int port_index: target port as indexed in app's `ports` array
:param str protocol: health check protocol ('HTTP', 'TCP', or 'COMMAND')
:param int timeout_seconds: how long before a waiting health check is considered failed
:param bool ignore_http1xx: Ignore HTTP informational status codes 100 to 199.
:param dict kwargs: additional arguments for forward compatibility
"""

def __init__(self, command=None, grace_period_seconds=None, interval_seconds=None, max_consecutive_failures=None,
path=None, port_index=None, protocol=None, timeout_seconds=None):
path=None, port_index=None, protocol=None, timeout_seconds=None, ignore_http1xx=None, **kwargs):
self.command = command
self.grace_period_seconds = grace_period_seconds
self.interval_seconds = interval_seconds
Expand All @@ -151,6 +153,10 @@ def __init__(self, command=None, grace_period_seconds=None, interval_seconds=Non
self.port_index = port_index
self.protocol = protocol
self.timeout_seconds = timeout_seconds
self.ignore_http1xx = ignore_http1xx
# additional not previously known healthcheck attributes
for k, v in kwargs.items():
setattr(self, k, v)


class MarathonTaskFailure(MarathonObject):
Expand Down

0 comments on commit de5c91a

Please sign in to comment.