def send_to_queue(<EOL>self,<EOL>args: Tuple=(),<EOL>kwargs: Dict[str, Any]={},<EOL>host: str=None,<EOL>wait_result: Union[int, float]=None,<EOL>message_ttl: Union[int, float]=None,<EOL>) -> Any:
if self.kuyruk.config.EAGER:<EOL><INDENT>result = self.apply(*args, **kwargs)<EOL>return result if wait_result else None<EOL><DEDENT>logger.debug("<STR_LIT>", args, kwargs)<EOL>queue = self._queue_for_host(host)<EOL>description = self._get_description(args, kwargs)<EOL>self._send_signal(signals.task_presend, args=args, kwargs=kwargs, description=description)<EOL>body = json.dumps(description)<EOL>msg = amqp.Message(body=body)<EOL>if wait_result:<EOL><INDENT>msg.properties['<STR_LIT>'] = '<STR_LIT>'<EOL><DEDENT>if message_ttl:<EOL><INDENT>msg.properties['<STR_LIT>'] = str(int(message_ttl * <NUM_LIT:1000>))<EOL><DEDENT>with self.kuyruk.channel() as ch:<EOL><INDENT>if wait_result:<EOL><INDENT>result = Result(ch.connection)<EOL>ch.basic_consume(queue='<STR_LIT>', no_ack=True, callback=result.process_message)<EOL><DEDENT>ch.queue_declare(queue=queue, durable=True, auto_delete=False)<EOL>ch.basic_publish(msg, exchange="<STR_LIT>", routing_key=queue)<EOL>self._send_signal(signals.task_postsend, args=args, kwargs=kwargs, description=description)<EOL>if wait_result:<EOL><INDENT>return result.wait(wait_result)<EOL><DEDENT><DEDENT>
Sends a message to the queue.
A worker will run the task's function when it receives the message.

:param args: Arguments that will be passed to task on execution.
:param kwargs: Keyword arguments that will be passed to task
    on execution.
:param host: Send this task to specific host. ``host`` will be
    appended to the queue name. If ``host`` is "localhost", hostname
    of the server will be appended to the queue name.
:param wait_result:
    Wait for result from worker for ``wait_result`` seconds.
    If timeout occurs,
    :class:`~kuyruk.exceptions.ResultTimeout` is raised.
    If excecption occurs in worker,
    :class:`~kuyruk.exceptions.RemoteException` is raised.
:param message_ttl:
    If set, message will be destroyed in queue after ``message_ttl``
    seconds.
:return: Result from worker if ``wait_result`` is set,
    else :const:`None`.