def backend_preparation(self, msg):
        context = msg.extra_backend_context()
        grouped_identities = self.group_outgoing_identities(msg)
        for backend_name, identities in grouped_identities.items():
            eager = self.is_eager(backend_name)
            if eager:
                logger.debug('Executing in current process')
                send_async(backend_name, msg.id, msg.text, identities,
                           context)
            else:
                logger.debug('Executing asynchronously')
                send_async.delay(backend_name, msg.id, msg.text, identities,
                                 context)
Queue outbound message to be processed in the background.
dataset/ETHPy150Open rapidsms/rapidsms/rapidsms/router/celery/router.py/CeleryRouter.backend_preparation