def consume(self, data): # type: (Dict[str, Any]) -> None try: send_email_from_dict(data) except EmailNotDeliveredException: # TODO: Do something smarter here .. pass
def consume(self, data): # type: (Mapping[str, Any]) -> None try: send_email_from_dict(data) except EmailNotDeliveredException: # TODO: Do something smarter here .. pass
def consume(self, event: Dict[str, Any]) -> None: # Copy the event, so that we don't pass the `failed_tries' # data to send_email_from_dict (which neither takes that # argument nor needs that data). copied_event = copy.deepcopy(event) if 'failed_tries' in copied_event: del copied_event['failed_tries'] send_email_from_dict(copied_event)
def consume(self, data): # type: (Mapping[str, Any]) -> None send_email_from_dict(data)