Exemplo n.º 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
Exemplo n.º 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
Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 5
0
 def consume(self, data):
     # type: (Mapping[str, Any]) -> None
     send_email_from_dict(data)
Exemplo n.º 6
0
 def consume(self, data):
     # type: (Mapping[str, Any]) -> None
     send_email_from_dict(data)