Skip to content

Commit

Permalink
Kwargs on the _send_event call
Browse files Browse the repository at this point in the history
This allows for less-strict function calls.
  • Loading branch information
thisiscab committed Dec 14, 2018
1 parent a7f76fc commit 5ba5917
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions luigi/contrib/datadog_metric.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,10 @@ def handle_task_done(self, task):
event_tags = tags + ["task_state:DONE"]
self._send_event(title=title, text=text, tags=event_tags, alert_type='info', priority='low')

def _send_event(self, title=None, text=None, tags=[], alert_type='info', priority='normal'):
all_tags = tags + self.default_tags()
def _send_event(self, **params):
params['tags'] += self.default_tags

api.Event.create(title=title, text=text, tags=all_tags, alert_type=alert_type, priority=priority)
api.Event.create(params)

def _send_gauge(self, metric_name, value, tags=[]):
all_tags = tags + self.default_tags()
Expand Down

0 comments on commit 5ba5917

Please sign in to comment.