def run_dispatch(self, sent_to_address=None):
     """
     Starts the dispatch process.
     """
     dispatch.process(
         force_bytes(self.message.as_string(), 'utf-8'),
         sent_to_address
     )
示例#2
0
    def handle(self, *args, **kwargs):
        logger.info('Processing a received package message')

        if six.PY3:
            self.input_file = self.input_file.detach()
        input_data = self.input_file.read()
        sent_to = self._get_to_address()

        dispatch.process(input_data, sent_to)

        logger.info('Completed processing a received package message')