)]}'
{"mistral/actions/std_actions.py":[{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"5d12c13e2d41053f2a9ef2be623abcc21f1c810e","unresolved":false,"context_lines":[{"line_number":436,"context_line":"        return self.script"},{"line_number":437,"context_line":""},{"line_number":438,"context_line":""},{"line_number":439,"context_line":"class AMQPAction(base.Action):"},{"line_number":440,"context_line":"    def __init__(self, method, client_method, topic, server\u003dNone, host\u003dNone,"},{"line_number":441,"context_line":"                 port\u003dNone, username\u003dNone, password\u003dNone, transport\u003dNone,"},{"line_number":442,"context_line":"                 virtual_host\u003dNone, ctxt\u003d{}, fanout\u003dFalse, timeout\u003dNone,"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a7b0d38_d5d30237","line":439,"range":{"start_line":439,"start_character":6,"end_line":439,"end_character":16},"updated":"2015-12-24 10:45:32.000000000","message":"I\u0027m a little bit confused about the approach. The action is called \"AMQPAction\" which tells me that it\u0027s purely about AMQP but I see that some oslo.messaging abstractions leak into the interface (params) like method, client_method  and transport. Doesn\u0027t make sense to me to mix up oslo with pure AMQP thing.","commit_id":"892b34e3c2f91a3ed6c020a9e9f57047228bfc29"},{"author":{"_account_id":7700,"name":"Nikolay Mahotkin","email":"nikolay.makhotkin@gmail.com","username":"nmakhotkin"},"change_message_id":"6e58e4c866b685023fba459debb15f1b17aeacfb","unresolved":false,"context_lines":[{"line_number":487,"context_line":"        self.client_method \u003d client_method"},{"line_number":488,"context_line":""},{"line_number":489,"context_line":"    def run(self):"},{"line_number":490,"context_line":"        client \u003d messaging.RPCClient(self.transport,"},{"line_number":491,"context_line":"                                     self.target,"},{"line_number":492,"context_line":"                                     timeout\u003dself.timeout,"},{"line_number":493,"context_line":"                                     retry\u003dself.retry)"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a7b0d38_7b3b1d39","line":490,"range":{"start_line":490,"start_character":27,"end_line":490,"end_character":36},"updated":"2015-12-24 12:01:48.000000000","message":"In fact, the action called \"AMPQ\" but it invokes some RPC stuff. If it is needed to implement AMQP, it will be done using pure AMQP, say, pika or amqpclient. How is an user may know about these abstractions? Btw, as I know, oslo.messaging serialize somehow their messages. What if the end user is not using oslo.messaging?","commit_id":"892b34e3c2f91a3ed6c020a9e9f57047228bfc29"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"6ada7246104b9c33f0435eea00e65bf292d2b08a","unresolved":false,"context_lines":[{"line_number":500,"context_line":"            raise exc.ActionException(\"AMQPAction failed: %s\" % str(e))"},{"line_number":501,"context_line":""},{"line_number":502,"context_line":"    def test(self):"},{"line_number":503,"context_line":"        # TODO(rakhmerov): Implement."},{"line_number":504,"context_line":"        return None"},{"line_number":505,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"1a7b0d38_9b35a947","line":503,"range":{"start_line":503,"start_character":15,"end_line":503,"end_character":24},"updated":"2015-12-24 12:01:10.000000000","message":"This comment is not left by me :) Please fix it.","commit_id":"892b34e3c2f91a3ed6c020a9e9f57047228bfc29"},{"author":{"_account_id":5558,"name":"Winson Chan","email":"wcchan@stackstorm.com","username":"winson-c-chan"},"change_message_id":"82e064918db8360f01f3c608bf84e49a0d751ac8","unresolved":false,"context_lines":[{"line_number":436,"context_line":""},{"line_number":437,"context_line":""},{"line_number":438,"context_line":"class AMQPAction(base.Action):"},{"line_number":439,"context_line":"    def __init__(self, host, port, queue, fanout\u003dFalse, exchange\u003d\u0027\u0027,"},{"line_number":440,"context_line":"                 virtual_host\u003d\u0027/\u0027, username\u003dNone, password\u003dNone, message\u003d{}):"},{"line_number":441,"context_line":"        if username and password:"},{"line_number":442,"context_line":"            credential \u003d pika.credentials.PlainCredentials("}],"source_content_type":"text/x-python","patch_set":4,"id":"fa69d971_03960493","line":439,"updated":"2016-01-04 23:13:19.000000000","message":"exchange cannot default to None?","commit_id":"f7bef086f00f807c5902aea5bea262a472aff4d0"},{"author":{"_account_id":5558,"name":"Winson Chan","email":"wcchan@stackstorm.com","username":"winson-c-chan"},"change_message_id":"82e064918db8360f01f3c608bf84e49a0d751ac8","unresolved":false,"context_lines":[{"line_number":451,"context_line":"            port\u003dport,"},{"line_number":452,"context_line":"            credentials\u003dcredential,"},{"line_number":453,"context_line":"            virtual_host\u003dvirtual_host"},{"line_number":454,"context_line":"        ))"},{"line_number":455,"context_line":"        self.channel \u003d self.connection.channel()"},{"line_number":456,"context_line":"        self.exchange \u003d (exchange if fanout is True else \u0027\u0027)"},{"line_number":457,"context_line":"        self.queue \u003d queue"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa69d971_639d80bb","line":454,"updated":"2016-01-04 23:13:19.000000000","message":"Can we set the connection and channel in the run method with a local scope in the try-catch block below and then use finally to close the connection? This action instance is not going to be used more than once. I prefer the work to be done in the run method with proper error handling and cleanup.\n\nAlso, please use the following style.\n\nconnection \u003d pika.BlockingConnection(\n    pika.ConnectionParameters(\n        host\u003dhost,\n        ...\n    )\n)","commit_id":"f7bef086f00f807c5902aea5bea262a472aff4d0"},{"author":{"_account_id":5558,"name":"Winson Chan","email":"wcchan@stackstorm.com","username":"winson-c-chan"},"change_message_id":"82e064918db8360f01f3c608bf84e49a0d751ac8","unresolved":false,"context_lines":[{"line_number":462,"context_line":"            self.channel.basic_publish(exchange\u003dself.exchange,"},{"line_number":463,"context_line":"                                       routing_key\u003dself.queue,"},{"line_number":464,"context_line":"                                       body\u003dself.message"},{"line_number":465,"context_line":"                                       )"},{"line_number":466,"context_line":"        except Exception as e:"},{"line_number":467,"context_line":"            raise exc.ActionException(\"AMQPAction failed: %s\" % str(e))"},{"line_number":468,"context_line":"        self.connection.close()"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa69d971_e34df03e","line":465,"updated":"2016-01-04 23:13:19.000000000","message":"Please use the following style.\n\nself.channel.basic_publish(\n    exchange\u003dself.exchange,\n    routing_key\u003dself.queue,\n    body\u003dself.message\n)","commit_id":"f7bef086f00f807c5902aea5bea262a472aff4d0"}]}
