a
    xd"                     @   sX   d Z ddlZddlmZmZ ejddejedd Zejedejd	d
 Z	dS )zEThe ``celery list bindings`` command, used to inspect queue bindings.    N)CeleryCommandhandle_preload_optionslist)namec                 C   s   dS )z^Get info from broker.

    Note:

        For RabbitMQ the management plugin is required.
    N ctxr   r   G/var/www/html/Ranjet/env/lib/python3.9/site-packages/celery/bin/list.pylist_   s    r
   )clsc              	      s    j j}| }|j|  z|j }W n tyL   t	
dY n0  fdd}|ddd |ddd |D ]}||d |d	 |d
  qvW d   n1 s0    Y  dS )zInspect queue bindings.z$Your transport cannot list bindings.c                    s$    j | dd|dd|  d S )Nz<28 )objZecho)qerr   r   r	   fmt!   s    zbindings.<locals>.fmtQueueZExchangezRouting Keyz----------------ZdestinationsourceZrouting_keyN)r   app
connectionZamqpZTaskConsumerZdeclaremanagerZget_bindingsNotImplementedErrorclickZ
UsageError)r   r   connbindingsr   br   r   r	   r      s    
r   )
__doc__r   Zcelery.bin.baser   r   groupZpass_contextr
   commandr   r   r   r   r	   <module>   s   
	
