)]}'
{"marconi/queues/storage/mongodb/messages.py":[{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"e0ac3397a1773ed326f535ef64d28895ec3e2399","unresolved":false,"context_lines":[{"line_number":486,"context_line":"        return utils.HookedCursor(messages, denormalizer)"},{"line_number":487,"context_line":""},{"line_number":488,"context_line":"    @utils.raises_conn_error"},{"line_number":489,"context_line":"    @utils.retries_on_autoreconnect"},{"line_number":490,"context_line":"    def post(self, queue_name, messages, client_uuid, project\u003dNone):"},{"line_number":491,"context_line":"        if not self._queue_ctrl.exists(queue_name, project):"},{"line_number":492,"context_line":"            raise errors.QueueDoesNotExist(queue_name, project)"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAVn%2F%2Fu4I%3D","line":489,"updated":"2014-03-04 12:38:17.000000000","message":"This one should be safe as well, since we\u0027ve a 2-step insert for messages. The worst case scenario is that we\u0027ll increase the counter several times and we\u0027d end up with some messages non-active messages.\n\nDo you mind adding a comment explaining this too?","commit_id":"c4d706c1ca7def39c43f392463392f0bc8919906"}],"marconi/queues/storage/mongodb/queues.py":[{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"e0ac3397a1773ed326f535ef64d28895ec3e2399","unresolved":false,"context_lines":[{"line_number":198,"context_line":"        return queue.get(\u0027m\u0027, {})"},{"line_number":199,"context_line":""},{"line_number":200,"context_line":"    @utils.raises_conn_error"},{"line_number":201,"context_line":"    @utils.retries_on_autoreconnect"},{"line_number":202,"context_line":"    def create(self, name, project\u003dNone):"},{"line_number":203,"context_line":"        try:"},{"line_number":204,"context_line":"            # NOTE(kgriffs): Start counting at 1, and assume the first"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAVn%2F%2Fu1k%3D","line":201,"updated":"2014-03-04 12:38:17.000000000","message":"if the connection fails after it was called and we retry to insert the queue, we could end up returning `False` because of the `DuplicatedKeyError` although the queue was indeed created by this API call.\n\nI don\u0027t think it\u0027s a *big* issue since I don\u0027t think the return value of this call is useful at all from a client stand point.","commit_id":"c4d706c1ca7def39c43f392463392f0bc8919906"}],"marconi/queues/storage/mongodb/utils.py":[{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"e0ac3397a1773ed326f535ef64d28895ec3e2399","unresolved":false,"context_lines":[{"line_number":273,"context_line":""},{"line_number":274,"context_line":"    @functools.wraps(func)"},{"line_number":275,"context_line":"    def wrapper(self, *args, **kwargs):"},{"line_number":276,"context_line":"        max_attemps \u003d self.driver.mongodb_conf.max_reconnect_attempts"},{"line_number":277,"context_line":"        sleep_sec \u003d self.driver.mongodb_conf.reconnect_sleep"},{"line_number":278,"context_line":""},{"line_number":279,"context_line":"        for attempt in range(max_attemps):"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAVn%2F%2Fu0o%3D","line":276,"updated":"2014-03-04 12:38:17.000000000","message":"I wish we could avoid relying on the presence of `mongodb_conf` but I can\u0027t come up with something better now. :/","commit_id":"c4d706c1ca7def39c43f392463392f0bc8919906"}],"tests/unit/queues/storage/test_impl_mongodb.py":[{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"e0ac3397a1773ed326f535ef64d28895ec3e2399","unresolved":false,"context_lines":[{"line_number":57,"context_line":""},{"line_number":58,"context_line":"        MockDriver \u003d collections.namedtuple(\u0027MockDriver\u0027, \u0027mongodb_conf\u0027)"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"        mongodb_conf \u003d MockConfig(self.MAX_AUTORECONNECT_ATTEMPTS,"},{"line_number":61,"context_line":"                                  self.AUTORECONNECT_SLEEP)"},{"line_number":62,"context_line":"        self.driver \u003d MockDriver(mongodb_conf)"},{"line_number":63,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAVn%2F%2FuyE%3D","line":60,"updated":"2014-03-04 12:38:17.000000000","message":"no need to mock config, you should be able to re-use `self.conf`\n\n    self.config(max_reconnect_attempts\u003dself.MAX_AUTORECONNECT_ATTEMPTS, ...)\n    self.driver \u003d MockDriver(self.conf)","commit_id":"c4d706c1ca7def39c43f392463392f0bc8919906"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"e0ac3397a1773ed326f535ef64d28895ec3e2399","unresolved":false,"context_lines":[{"line_number":102,"context_line":"        self.assertRaises(ValueError, utils.calculate_backoff, 11, 10, 2, 0)"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"    def test_retries_on_autoreconnect(self):"},{"line_number":105,"context_line":"        num_calls \u003d [0]"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"        @utils.retries_on_autoreconnect"},{"line_number":108,"context_line":"        def _raises_autoreconnect(self):"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAVn%2F%2FuwQ%3D","line":105,"updated":"2014-03-04 12:38:17.000000000","message":"why does this need to be `[0]` ?","commit_id":"c4d706c1ca7def39c43f392463392f0bc8919906"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"e0ac3397a1773ed326f535ef64d28895ec3e2399","unresolved":false,"context_lines":[{"line_number":110,"context_line":"            raise pymongo.errors.AutoReconnect()"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"        self.assertRaises(pymongo.errors.AutoReconnect,"},{"line_number":113,"context_line":"                          _raises_autoreconnect, self)"},{"line_number":114,"context_line":"        self.assertEqual(num_calls, [self.MAX_AUTORECONNECT_ATTEMPTS])"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"    def test_retries_on_autoreconnect_neg(self):"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAVn%2F%2FuwY%3D","line":113,"updated":"2014-03-04 12:38:17.000000000","message":"shouldn\u0027t `self.driver` be passed instead of self ? I\u0027m missing something :(","commit_id":"c4d706c1ca7def39c43f392463392f0bc8919906"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"ba6c66291cde05e4a3f84fb06dcfa66440ed06e4","unresolved":false,"context_lines":[{"line_number":100,"context_line":"        self.assertRaises(ValueError, utils.calculate_backoff, 11, 10, 2, 0)"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"    def test_retries_on_autoreconnect(self):"},{"line_number":103,"context_line":"        num_calls \u003d [0]"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"        @utils.retries_on_autoreconnect"},{"line_number":106,"context_line":"        def _raises_autoreconnect(self):"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAVn%2F%2Fk0U%3D","line":103,"updated":"2014-03-05 09:26:48.000000000","message":"mmh, it\u0027s still not clear to me why this has to be `[0]` as opposed to just `0`","commit_id":"c13fb6f93eba49f88d88820d0c06b3d4be89d558"},{"author":{"_account_id":6427,"name":"Kurt Griffiths","email":"kurt.griffiths@rackspace.com","username":"kgriffs"},"change_message_id":"86ec13f7941b54e11a7603591f1aeae72f40ea5a","unresolved":false,"context_lines":[{"line_number":100,"context_line":"        self.assertRaises(ValueError, utils.calculate_backoff, 11, 10, 2, 0)"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"    def test_retries_on_autoreconnect(self):"},{"line_number":103,"context_line":"        num_calls \u003d [0]"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"        @utils.retries_on_autoreconnect"},{"line_number":106,"context_line":"        def _raises_autoreconnect(self):"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAVn%2F%2Fktg%3D","line":103,"in_reply_to":"AAAAVn%2F%2Fk0U%3D","updated":"2014-03-05 09:39:43.000000000","message":"If I just do this:\n\n    num_calls +\u003d 1\n\nInstead of this:\n\n    num_calls[0] +\u003d 1\n\nPython raises UnboundLocalError.","commit_id":"c13fb6f93eba49f88d88820d0c06b3d4be89d558"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"7c8a8cca3d439edb5f92c29688f3702ce4fa9321","unresolved":false,"context_lines":[{"line_number":100,"context_line":"        self.assertRaises(ValueError, utils.calculate_backoff, 11, 10, 2, 0)"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"    def test_retries_on_autoreconnect(self):"},{"line_number":103,"context_line":"        num_calls \u003d [0]"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"        @utils.retries_on_autoreconnect"},{"line_number":106,"context_line":"        def _raises_autoreconnect(self):"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAVn%2F%2FkqA%3D","line":103,"in_reply_to":"AAAAVn%2F%2Fktg%3D","updated":"2014-03-05 09:46:09.000000000","message":"mumble","commit_id":"c13fb6f93eba49f88d88820d0c06b3d4be89d558"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"ba6c66291cde05e4a3f84fb06dcfa66440ed06e4","unresolved":false,"context_lines":[{"line_number":108,"context_line":"            raise pymongo.errors.AutoReconnect()"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"        self.assertRaises(pymongo.errors.AutoReconnect,"},{"line_number":111,"context_line":"                          _raises_autoreconnect, self)"},{"line_number":112,"context_line":"        self.assertEqual(num_calls, [self.mongodb_conf.max_reconnect_attempts])"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"    def test_retries_on_autoreconnect_neg(self):"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAVn%2F%2Fkzo%3D","line":111,"updated":"2014-03-05 09:26:48.000000000","message":"shouldn\u0027t this be `self.driver` ? \n\nI think you may want to either pass `self.driver` here or get rid of `self.driver` since it\u0027s not currently being used.","commit_id":"c13fb6f93eba49f88d88820d0c06b3d4be89d558"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"7c8a8cca3d439edb5f92c29688f3702ce4fa9321","unresolved":false,"context_lines":[{"line_number":108,"context_line":"            raise pymongo.errors.AutoReconnect()"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"        self.assertRaises(pymongo.errors.AutoReconnect,"},{"line_number":111,"context_line":"                          _raises_autoreconnect, self)"},{"line_number":112,"context_line":"        self.assertEqual(num_calls, [self.mongodb_conf.max_reconnect_attempts])"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"    def test_retries_on_autoreconnect_neg(self):"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAVn%2F%2FkqI%3D","line":111,"in_reply_to":"AAAAVn%2F%2Fkvc%3D","updated":"2014-03-05 09:46:09.000000000","message":"Ahhhhh, it expects the `driver` bit to. Gotcha, thanks!","commit_id":"c13fb6f93eba49f88d88820d0c06b3d4be89d558"},{"author":{"_account_id":6427,"name":"Kurt Griffiths","email":"kurt.griffiths@rackspace.com","username":"kgriffs"},"change_message_id":"86ec13f7941b54e11a7603591f1aeae72f40ea5a","unresolved":false,"context_lines":[{"line_number":108,"context_line":"            raise pymongo.errors.AutoReconnect()"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"        self.assertRaises(pymongo.errors.AutoReconnect,"},{"line_number":111,"context_line":"                          _raises_autoreconnect, self)"},{"line_number":112,"context_line":"        self.assertEqual(num_calls, [self.mongodb_conf.max_reconnect_attempts])"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"    def test_retries_on_autoreconnect_neg(self):"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAVn%2F%2Fkvc%3D","line":111,"in_reply_to":"AAAAVn%2F%2Fkzo%3D","updated":"2014-03-05 09:39:43.000000000","message":"`self` is used by the retries_on_autoreconnect decorator, even though _raises_autoreconnect does not reference it.\n\nIt has to be just \"self\", because the decorator is expecting an instance of a controller class that defines a \"driver\" attribute. If I change this to \"self.driver\" then the test fails.","commit_id":"c13fb6f93eba49f88d88820d0c06b3d4be89d558"}]}
