Example #1
0
 def consume(self, data):
     # type: (Dict[str, Any]) -> None
     try:
         send_email_from_dict(data)
     except EmailNotDeliveredException:
         # TODO: Do something smarter here ..
         pass
Example #2
0
 def consume(self, data):
     # type: (Mapping[str, Any]) -> None
     try:
         send_email_from_dict(data)
     except EmailNotDeliveredException:
         # TODO: Do something smarter here ..
         pass
Example #3
0
 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)
Example #4
0
 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)
Example #5
0
 def consume(self, data):
     # type: (Mapping[str, Any]) -> None
     send_email_from_dict(data)
Example #6
0
 def consume(self, data):
     # type: (Mapping[str, Any]) -> None
     send_email_from_dict(data)