)]}'
{"ceilometer/batch_executor.py":[{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"925a84ff257b15e73227c1af0c56c8a236b80d6e","unresolved":false,"context_lines":[{"line_number":61,"context_line":"                    if len(self._todo) \u003c self._todo_max_size:"},{"line_number":62,"context_line":"                        self._todo_lock.wait(self._todo_max_life)"},{"line_number":63,"context_line":"                    while (not self._todo and not self._tombstone.is_set()):"},{"line_number":64,"context_line":"                        self._todo_lock.wait(self._todo_max_life)"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"                    if (not self._todo and self._tombstone.is_set()):"},{"line_number":67,"context_line":"                        return"}],"source_content_type":"text/x-python","patch_set":13,"id":"3a50d1a3_7afa5c45","line":64,"updated":"2015-07-30 13:35:28.000000000","message":"this 4 lines could be:\n\nif not self._tombstone.is_set() and (len(self._todo) \u003d\u003d 0 or len(self._todo) \u003c self._todo_max_size): self._todo_lock.wait(self._todo_max_life)\n\nI think…\n\nbut that\u0027s not a correct algo since if you have len(todo) \u003d 5 and max_size \u003d 10 when you evaluate that, you sleep max_life. But maybe at max_life/2 your len(todo) grows to 100 and so len(todo) \u003e max_size and you\u0027re still sleeping. :(\n\nI\u0027m pretty sure we already have something like that in some middleware or something handling queues (like Swift IIRC), can\u0027t we use some common code? That looks like a so common pattern in Ceilometer.","commit_id":"460281fcaac62361da36cb6eb16018c5da3f7dd5"}],"ceilometer/dispatcher/batch.py":[{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"409e9802a71f9e3e92d4b6923bb85134c19258d5","unresolved":false,"context_lines":[{"line_number":61,"context_line":"    size \u003d 512"},{"line_number":62,"context_line":"    dispatcher \u003d gnocchi"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"    TODO(sileht): to the same for publishers."},{"line_number":65,"context_line":"    \"\"\""},{"line_number":66,"context_line":"    def __init__(self, conf):"},{"line_number":67,"context_line":"        super(BatchDispatcher, self).__init__(conf)"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a50d1a3_b5d6a4c3","line":64,"updated":"2015-07-20 16:57:22.000000000","message":"do?","commit_id":"3df3bda4c1e2b4d1d2164d245f5005fd3a1edaaa"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"e0d18314a236ea3a732c11ec0faee9ef9107a2e9","unresolved":false,"context_lines":[{"line_number":61,"context_line":"    size \u003d 512"},{"line_number":62,"context_line":"    dispatcher \u003d gnocchi"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"    TODO(sileht): to the same for publishers."},{"line_number":65,"context_line":"    \"\"\""},{"line_number":66,"context_line":"    def __init__(self, conf):"},{"line_number":67,"context_line":"        super(BatchDispatcher, self).__init__(conf)"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a50d1a3_03bb7be6","line":64,"in_reply_to":"3a50d1a3_b5d6a4c3","updated":"2015-07-21 10:30:37.000000000","message":"Done","commit_id":"3df3bda4c1e2b4d1d2164d245f5005fd3a1edaaa"}]}
