)]}'
{"monasca_notification/processors/base.py":[{"author":{"_account_id":11094,"name":"Tim Kuhlman","email":"timothy.kuhlman@canonical.com","username":"kuhlmant"},"change_message_id":"795704b62ec8814ac19fcd18249591e5e812955c","unresolved":false,"context_lines":[{"line_number":14,"context_line":"# limitations under the License."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"class BaseProcessor(object):"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"    dimensions \u003d {\u0027service\u0027: \u0027monitoring\u0027, \u0027component\u0027: \u0027monasca-notification\u0027}"}],"source_content_type":"text/x-python","patch_set":2,"id":"da86d52c_23882622","line":17,"updated":"2015-01-30 23:02:45.000000000","message":"I noticed all the processors setup self._statsd the same way. Any reason that isn\u0027t here in an __init__ ?","commit_id":"3eb169fac392d1ba2c75aaec8de7856d2aa06e78"},{"author":{"_account_id":14273,"name":"Joe Keen","email":"joe.keen@hpe.com","username":"jkeen"},"change_message_id":"7865740ca1b4a53b84dd033ddd3997152304dba2","unresolved":false,"context_lines":[{"line_number":14,"context_line":"# limitations under the License."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"class BaseProcessor(object):"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"    dimensions \u003d {\u0027service\u0027: \u0027monitoring\u0027, \u0027component\u0027: \u0027monasca-notification\u0027}"}],"source_content_type":"text/x-python","patch_set":2,"id":"da86d52c_7e463525","line":17,"in_reply_to":"da86d52c_23882622","updated":"2015-01-30 23:30:51.000000000","message":"I don\u0027t think there\u0027s any reason we couldn\u0027t do it there now.  Is there any reason it wasn\u0027t done there before?","commit_id":"3eb169fac392d1ba2c75aaec8de7856d2aa06e78"}],"monasca_notification/processors/kafka_producer.py":[{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"adeccdd26db1171787fe0304da1b47e0574b6ab8","unresolved":false,"context_lines":[{"line_number":43,"context_line":"    def publish(self, topic, messages):"},{"line_number":44,"context_line":"        \"\"\"Takes messages and puts them on the supplied kafka topic"},{"line_number":45,"context_line":"        \"\"\""},{"line_number":46,"context_line":"        published_to_kafka \u003d self._statsd.get_counter(name\u003d\u0027published_to_kafka\u0027)"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"        for message in messages:"},{"line_number":49,"context_line":"            responses \u003d self._producer.send_messages(topic, message.to_json())"}],"source_content_type":"text/x-python","patch_set":2,"id":"da86d52c_a15217db","line":46,"updated":"2015-02-02 18:30:49.000000000","message":"Would prefer something like \"count_published_messages\" or something that makes it clear that this variable and statsd counter is for specifically counting the number of messages sent.","commit_id":"3eb169fac392d1ba2c75aaec8de7856d2aa06e78"},{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"adeccdd26db1171787fe0304da1b47e0574b6ab8","unresolved":false,"context_lines":[{"line_number":46,"context_line":"        published_to_kafka \u003d self._statsd.get_counter(name\u003d\u0027published_to_kafka\u0027)"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"        for message in messages:"},{"line_number":49,"context_line":"            responses \u003d self._producer.send_messages(topic, message.to_json())"},{"line_number":50,"context_line":"            published_to_kafka +\u003d 1"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"            log.debug(\u0027Published to topic {}, message {}\u0027.format(topic, message.to_json()))"}],"source_content_type":"text/x-python","patch_set":2,"id":"da86d52c_010a0321","line":49,"updated":"2015-02-02 18:30:49.000000000","message":"As the conversion to json could result in an exception due to a bad message do you want to a a try/except block that logs the bad message and continue with the remainder of the messages?\n\nAlso, as send_messages could result in a Kafka exception do you want to have a try/except block for that one too?","commit_id":"3eb169fac392d1ba2c75aaec8de7856d2aa06e78"}]}
