(amqp_context, queue, exchange, routing_key)
| 135 | type=str) |
| 136 | @click.pass_obj |
| 137 | def queue_bind(amqp_context, queue, exchange, routing_key): |
| 138 | if amqp_context.channel is None: |
| 139 | amqp_context.echo_error('Not connected to broker. Please retry...') |
| 140 | amqp_context.reconnect() |
| 141 | else: |
| 142 | try: |
| 143 | amqp_context.channel.queue_bind(queue=queue, |
| 144 | exchange=exchange, |
| 145 | routing_key=routing_key) |
| 146 | except Exception as e: |
| 147 | amqp_context.echo_error(e) |
| 148 | amqp_context.reconnect() |
| 149 | else: |
| 150 | amqp_context.echo_ok() |
| 151 | |
| 152 | |
| 153 | @amqp.command(name='queue.declare') |
nothing calls this directly
no test coverage detected