)]}'
{"aodh/notifier/zaqar.py":[{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"25ceea2222be2145a64c949eaedd4cfc4032935b","unresolved":false,"context_lines":[{"line_number":209,"context_line":"                }"},{"line_number":210,"context_line":"            }"},{"line_number":211,"context_line":"        }"},{"line_number":212,"context_line":"        try:"},{"line_number":213,"context_line":"            from zaqarclient.queues import client as zaqar_client"},{"line_number":214,"context_line":"            return zaqar_client.Client(self._get_endpoint(),"},{"line_number":215,"context_line":"                                       version\u003d2, conf\u003dparams)"},{"line_number":216,"context_line":"        except Exception:"},{"line_number":217,"context_line":"            LOG.error(_LE(\"Failed to connect to Zaqar service \"),"},{"line_number":218,"context_line":"                      exc_info\u003dTrue)"},{"line_number":219,"context_line":""},{"line_number":220,"context_line":"    def notify_zaqar(self, action, message, headers):"},{"line_number":221,"context_line":"        queue_info \u003d urlparse.parse_qs(action.query)"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a6eadb0_796a2d1c","line":218,"range":{"start_line":212,"start_character":0,"end_line":218,"end_character":36},"updated":"2016-12-12 23:13:52.000000000","message":"can probably refactor this to share with above.","commit_id":"54f33cdf4d1e2663adea9977614f6267a2eb1263"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"28dc40ef0a06dca96d0b9d5b0c1baf8eda38691f","unresolved":false,"context_lines":[{"line_number":217,"context_line":"            LOG.error(_LE(\"Failed to connect to Zaqar service \"),"},{"line_number":218,"context_line":"                      exc_info\u003dTrue)"},{"line_number":219,"context_line":""},{"line_number":220,"context_line":"    def notify_zaqar(self, action, message, headers):"},{"line_number":221,"context_line":"        queue_info \u003d urlparse.parse_qs(action.query)"},{"line_number":222,"context_line":"        try:"},{"line_number":223,"context_line":"            queue_name \u003d queue_info.get(\u0027queue_name\u0027)[-1]"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a71b18c_74d539e3","line":220,"updated":"2016-12-12 11:09:49.000000000","message":"This seems to not build the queue name in the same way than the parent\u0027s method, nor use the TTL. Is this really what is wanted?","commit_id":"54f33cdf4d1e2663adea9977614f6267a2eb1263"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"3ede8b7f9f8ba5fa49346815c44aed805ad36066","unresolved":false,"context_lines":[{"line_number":217,"context_line":"            LOG.error(_LE(\"Failed to connect to Zaqar service \"),"},{"line_number":218,"context_line":"                      exc_info\u003dTrue)"},{"line_number":219,"context_line":""},{"line_number":220,"context_line":"    def notify_zaqar(self, action, message, headers):"},{"line_number":221,"context_line":"        queue_info \u003d urlparse.parse_qs(action.query)"},{"line_number":222,"context_line":"        try:"},{"line_number":223,"context_line":"            queue_name \u003d queue_info.get(\u0027queue_name\u0027)[-1]"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a6eadb0_563472dd","line":220,"in_reply_to":"3a71b18c_4f9b4366","updated":"2016-12-12 15:19:42.000000000","message":"Awesome, thanks for the explanation Zane.\nTold you I sucked at Zaqar. :p","commit_id":"54f33cdf4d1e2663adea9977614f6267a2eb1263"},{"author":{"_account_id":4257,"name":"Zane Bitter","email":"zbitter@redhat.com","username":"zaneb"},"change_message_id":"2d3fba5141c25eb34838a729feff19bf85a3a427","unresolved":false,"context_lines":[{"line_number":217,"context_line":"            LOG.error(_LE(\"Failed to connect to Zaqar service \"),"},{"line_number":218,"context_line":"                      exc_info\u003dTrue)"},{"line_number":219,"context_line":""},{"line_number":220,"context_line":"    def notify_zaqar(self, action, message, headers):"},{"line_number":221,"context_line":"        queue_info \u003d urlparse.parse_qs(action.query)"},{"line_number":222,"context_line":"        try:"},{"line_number":223,"context_line":"            queue_name \u003d queue_info.get(\u0027queue_name\u0027)[-1]"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a71b18c_4f9b4366","line":220,"in_reply_to":"3a71b18c_74d539e3","updated":"2016-12-12 13:48:39.000000000","message":"In a word, yes.\n\nThe parent method builds the queue name from the alarm id and topic because the queue is created in the service tenant, and thus has to be unique to prevent collisions between tenants. In this case we want to send messages to a queue defined by the user, so we have to use the name they provided us (queues don\u0027t have an ID, only a name). FWIW this is the same method of getting the queue name as in the pre-signed queue case in the parent.\n\nThe TTL in the parent is not the TTL of messages in the queue, but of the subscriptions that are created. This method doesn\u0027t offer a way of creating subscriptions, so it doesn\u0027t need a TTL. IMHO it\u0027s better to create subscriptions via orchestration that trying to program them into a URL. (I might be biased though ;) FWIW this is also the same as the pre-signed queue case in the parent.","commit_id":"54f33cdf4d1e2663adea9977614f6267a2eb1263"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"25ceea2222be2145a64c949eaedd4cfc4032935b","unresolved":false,"context_lines":[{"line_number":223,"context_line":"            queue_name \u003d queue_info.get(\u0027queue_name\u0027)[-1]"},{"line_number":224,"context_line":"        except IndexError:"},{"line_number":225,"context_line":"            LOG.error(_LE(\"Required \u0027queue_name\u0027 query option missing in\""},{"line_number":226,"context_line":"                          \" action %s\") % action)"},{"line_number":227,"context_line":""},{"line_number":228,"context_line":"        try:"},{"line_number":229,"context_line":"            client \u003d self.get_zaqar_client(headers[\u0027X-Auth-Token\u0027])"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a6eadb0_1935b945","line":226,"range":{"start_line":226,"start_character":39,"end_line":226,"end_character":41},"updated":"2016-12-12 23:13:52.000000000","message":"use \u0027,\u0027 instead","commit_id":"54f33cdf4d1e2663adea9977614f6267a2eb1263"},{"author":{"_account_id":4257,"name":"Zane Bitter","email":"zbitter@redhat.com","username":"zaneb"},"change_message_id":"80471110376c4128b1b86627ba5e1d2d28e6bfae","unresolved":false,"context_lines":[{"line_number":223,"context_line":"            queue_name \u003d queue_info.get(\u0027queue_name\u0027)[-1]"},{"line_number":224,"context_line":"        except IndexError:"},{"line_number":225,"context_line":"            LOG.error(_LE(\"Required \u0027queue_name\u0027 query option missing in\""},{"line_number":226,"context_line":"                          \" action %s\") % action)"},{"line_number":227,"context_line":""},{"line_number":228,"context_line":"        try:"},{"line_number":229,"context_line":"            client \u003d self.get_zaqar_client(headers[\u0027X-Auth-Token\u0027])"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a6eadb0_c85fc870","line":226,"range":{"start_line":226,"start_character":39,"end_line":226,"end_character":41},"in_reply_to":"1a6eadb0_1935b945","updated":"2016-12-13 15:35:00.000000000","message":"Oops, should return after this.","commit_id":"54f33cdf4d1e2663adea9977614f6267a2eb1263"}]}
