)]}'
{"openstack/exceptions.py":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"e3dc690376499ac5311009af5c9a060433cc1033","unresolved":false,"context_lines":[{"line_number":222,"context_line":"    \"\"\"Something went wrong with parsing your OpenStack Config.\"\"\""},{"line_number":223,"context_line":""},{"line_number":224,"context_line":""},{"line_number":225,"context_line":"class TaskManagerStopped(SDKException):"},{"line_number":226,"context_line":"    \"\"\"Operations were attempted on a stopped TaskManager.\"\"\""}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_280faae0","line":225,"updated":"2018-06-11 16:09:42.000000000","message":"not sure what the rules are here, but this sounds to me like RuntimeError, not SDKException..","commit_id":"ba09e88cb2461ca402c9908f7bae0cffef6b7f25"},{"author":{"_account_id":2,"name":"Monty Taylor","email":"mordred@inaugust.com","username":"mordred"},"change_message_id":"c59624b8c2148f380e19d22f255b515b9ae57999","unresolved":false,"context_lines":[{"line_number":222,"context_line":"    \"\"\"Something went wrong with parsing your OpenStack Config.\"\"\""},{"line_number":223,"context_line":""},{"line_number":224,"context_line":""},{"line_number":225,"context_line":"class TaskManagerStopped(SDKException):"},{"line_number":226,"context_line":"    \"\"\"Operations were attempted on a stopped TaskManager.\"\"\""}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_664cf375","line":225,"in_reply_to":"5f7c97a3_280faae0","updated":"2018-06-11 17:12:44.000000000","message":"++","commit_id":"ba09e88cb2461ca402c9908f7bae0cffef6b7f25"}],"openstack/task_manager.py":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"e3dc690376499ac5311009af5c9a060433cc1033","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"5f7c97a3_88683e88","updated":"2018-06-11 16:09:42.000000000","message":"This whole file looks like something that could belong in Futurist, if some parts are not already there.. The only openstack-specific part is exceptions.","commit_id":"ba09e88cb2461ca402c9908f7bae0cffef6b7f25"},{"author":{"_account_id":2,"name":"Monty Taylor","email":"mordred@inaugust.com","username":"mordred"},"change_message_id":"c59624b8c2148f380e19d22f255b515b9ae57999","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"5f7c97a3_eb09ac30","in_reply_to":"5f7c97a3_88683e88","updated":"2018-06-11 17:12:44.000000000","message":"Indeed - and thanks for mentioning that. I just went and had a look - and I think you\u0027re right. The ThreadPoolExecutor there already has a queue. I think we\u0027d need to add rate into the mix, but that shouldn\u0027t be terribly hard.\n\nOTOH, futurist would be a new depend, and it would bring in monotonic, contextlib2 and PrettyTable. None of that is a problem for services, but for the sdk we\u0027ve already probably got too many depends (I\u0027m a bit sad we added jmsepath filtering support - silly us)\n\nWhich is to say - we should totally talk about it and technically it\u0027s probably beneficial (would make use of sdk inside of openstack services very nice) - but we need to think about the extra depends as well.","commit_id":"ba09e88cb2461ca402c9908f7bae0cffef6b7f25"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"a31b897ce33b9556aa76915be7312aaf047b8351","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"5f7c97a3_46a53702","in_reply_to":"5f7c97a3_eb09ac30","updated":"2018-06-11 17:18:01.000000000","message":"I really wonder why Futurist uses PrettyTable O__o contextlib2 will go away with Python 2, apparently. JFYI I\u0027m a core on Futurist, so I can help with reviews if we need to move or change something there.","commit_id":"ba09e88cb2461ca402c9908f7bae0cffef6b7f25"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"e3dc690376499ac5311009af5c9a060433cc1033","unresolved":false,"context_lines":[{"line_number":184,"context_line":""},{"line_number":185,"context_line":"class RateLimitingTaskManager(TaskManager):"},{"line_number":186,"context_line":""},{"line_number":187,"context_line":"    def __init__(self, name, rate, workers\u003d5):"},{"line_number":188,"context_line":"        super(TaskManager, self).__init__("},{"line_number":189,"context_line":"            name\u003dname, workers\u003dworkers)"},{"line_number":190,"context_line":"        self.daemon \u003d True"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_a865fab0","line":187,"updated":"2018-06-11 16:09:42.000000000","message":"Where does 5 come from? Maybe use CPU count?","commit_id":"ba09e88cb2461ca402c9908f7bae0cffef6b7f25"},{"author":{"_account_id":2,"name":"Monty Taylor","email":"mordred@inaugust.com","username":"mordred"},"change_message_id":"c59624b8c2148f380e19d22f255b515b9ae57999","unresolved":false,"context_lines":[{"line_number":184,"context_line":""},{"line_number":185,"context_line":"class RateLimitingTaskManager(TaskManager):"},{"line_number":186,"context_line":""},{"line_number":187,"context_line":"    def __init__(self, name, rate, workers\u003d5):"},{"line_number":188,"context_line":"        super(TaskManager, self).__init__("},{"line_number":189,"context_line":"            name\u003dname, workers\u003dworkers)"},{"line_number":190,"context_line":"        self.daemon \u003d True"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_2604bb13","line":187,"in_reply_to":"5f7c97a3_a865fab0","updated":"2018-06-11 17:12:44.000000000","message":"It\u0027s magic!\n\nFor this patch it\u0027s just a passthrough of the default in the baseclass ... we should totally improve that though.","commit_id":"ba09e88cb2461ca402c9908f7bae0cffef6b7f25"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"e3dc690376499ac5311009af5c9a060433cc1033","unresolved":false,"context_lines":[{"line_number":191,"context_line":"        self.queue \u003d queue.Queue()"},{"line_number":192,"context_line":"        self._running \u003d True"},{"line_number":193,"context_line":"        self.rate \u003d float(rate)"},{"line_number":194,"context_line":"        self._thread \u003d threading.Thread(target\u003dself.run)"},{"line_number":195,"context_line":""},{"line_number":196,"context_line":"    def start(self):"},{"line_number":197,"context_line":"        self._thread.start()"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_480466c6","line":194,"updated":"2018-06-11 16:09:42.000000000","message":"I suspect people may want to customize it, e.g. people who use eventlet without monkey patching. ditto for Queue and for sleep below.","commit_id":"ba09e88cb2461ca402c9908f7bae0cffef6b7f25"},{"author":{"_account_id":2,"name":"Monty Taylor","email":"mordred@inaugust.com","username":"mordred"},"change_message_id":"c59624b8c2148f380e19d22f255b515b9ae57999","unresolved":false,"context_lines":[{"line_number":191,"context_line":"        self.queue \u003d queue.Queue()"},{"line_number":192,"context_line":"        self._running \u003d True"},{"line_number":193,"context_line":"        self.rate \u003d float(rate)"},{"line_number":194,"context_line":"        self._thread \u003d threading.Thread(target\u003dself.run)"},{"line_number":195,"context_line":""},{"line_number":196,"context_line":"    def start(self):"},{"line_number":197,"context_line":"        self._thread.start()"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_e611e354","line":194,"in_reply_to":"5f7c97a3_480466c6","updated":"2018-06-11 17:12:44.000000000","message":"Yeah - this is where futurist might make things nicer. That said - I think we could provide options for people like you\u0027re suggesting if we don\u0027t go that route.","commit_id":"ba09e88cb2461ca402c9908f7bae0cffef6b7f25"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"e3dc690376499ac5311009af5c9a060433cc1033","unresolved":false,"context_lines":[{"line_number":210,"context_line":"                task \u003d self.queue.get()"},{"line_number":211,"context_line":"                if not task:"},{"line_number":212,"context_line":"                    if not self._running:"},{"line_number":213,"context_line":"                        break"},{"line_number":214,"context_line":"                    continue"},{"line_number":215,"context_line":"                while True:"},{"line_number":216,"context_line":"                    delta \u003d time.time() - last_ts"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_680922db","line":213,"updated":"2018-06-11 16:09:42.000000000","message":"some log.debug about TaskManager done? or not worth it?","commit_id":"ba09e88cb2461ca402c9908f7bae0cffef6b7f25"},{"author":{"_account_id":2,"name":"Monty Taylor","email":"mordred@inaugust.com","username":"mordred"},"change_message_id":"c59624b8c2148f380e19d22f255b515b9ae57999","unresolved":false,"context_lines":[{"line_number":210,"context_line":"                task \u003d self.queue.get()"},{"line_number":211,"context_line":"                if not task:"},{"line_number":212,"context_line":"                    if not self._running:"},{"line_number":213,"context_line":"                        break"},{"line_number":214,"context_line":"                    continue"},{"line_number":215,"context_line":"                while True:"},{"line_number":216,"context_line":"                    delta \u003d time.time() - last_ts"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_a6176b46","line":213,"in_reply_to":"5f7c97a3_680922db","updated":"2018-06-11 17:12:44.000000000","message":"Not a bad idea.","commit_id":"ba09e88cb2461ca402c9908f7bae0cffef6b7f25"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"e3dc690376499ac5311009af5c9a060433cc1033","unresolved":false,"context_lines":[{"line_number":216,"context_line":"                    delta \u003d time.time() - last_ts"},{"line_number":217,"context_line":"                    if delta \u003e\u003d self.rate:"},{"line_number":218,"context_line":"                        break"},{"line_number":219,"context_line":"                    time.sleep(self.rate - delta)"},{"line_number":220,"context_line":"                self._log.debug("},{"line_number":221,"context_line":"                    \"TaskManager {name} queue size: {size})\".format("},{"line_number":222,"context_line":"                        name\u003dself.name,"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_080aeecf","line":219,"updated":"2018-06-11 16:09:42.000000000","message":"nit: allow passing the sleep function into __init__, so that e.g. people who don\u0027t monkey-patch could pass in eventlet.sleep.","commit_id":"ba09e88cb2461ca402c9908f7bae0cffef6b7f25"},{"author":{"_account_id":2,"name":"Monty Taylor","email":"mordred@inaugust.com","username":"mordred"},"change_message_id":"c59624b8c2148f380e19d22f255b515b9ae57999","unresolved":false,"context_lines":[{"line_number":216,"context_line":"                    delta \u003d time.time() - last_ts"},{"line_number":217,"context_line":"                    if delta \u003e\u003d self.rate:"},{"line_number":218,"context_line":"                        break"},{"line_number":219,"context_line":"                    time.sleep(self.rate - delta)"},{"line_number":220,"context_line":"                self._log.debug("},{"line_number":221,"context_line":"                    \"TaskManager {name} queue size: {size})\".format("},{"line_number":222,"context_line":"                        name\u003dself.name,"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_06389fd0","line":219,"in_reply_to":"5f7c97a3_080aeecf","updated":"2018-06-11 17:12:44.000000000","message":"Yah - I think that\u0027s a nice improvement. I want to pull this in as-is (it\u0027s what\u0027s in production in nodepool) and get some good tests written before we start making too many improvements.","commit_id":"ba09e88cb2461ca402c9908f7bae0cffef6b7f25"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"ecd21cff9d85c6fc596be2412c4449d030c936f5","unresolved":false,"context_lines":[{"line_number":216,"context_line":"                while True:"},{"line_number":217,"context_line":"                    delta \u003d time.time() - last_ts"},{"line_number":218,"context_line":"                    if delta \u003e\u003d self.rate:"},{"line_number":219,"context_line":"                        break"},{"line_number":220,"context_line":"                    time.sleep(self.rate - delta)"},{"line_number":221,"context_line":"                self._log.debug("},{"line_number":222,"context_line":"                    \"TaskManager {name} queue size: {size})\".format("}],"source_content_type":"text/x-python","patch_set":3,"id":"3f79a3b5_fbf403f3","line":219,"updated":"2018-08-14 10:40:35.000000000","message":"nit: I wonder if we need a log message before sleeping. Something like \"Sleeping {delay} seconds before running task {task}, queue size: {size}\".","commit_id":"b8017104d5c0c2510198ef685140e70083319259"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"ecd21cff9d85c6fc596be2412c4449d030c936f5","unresolved":false,"context_lines":[{"line_number":219,"context_line":"                        break"},{"line_number":220,"context_line":"                    time.sleep(self.rate - delta)"},{"line_number":221,"context_line":"                self._log.debug("},{"line_number":222,"context_line":"                    \"TaskManager {name} queue size: {size})\".format("},{"line_number":223,"context_line":"                        name\u003dself.name,"},{"line_number":224,"context_line":"                        size\u003dself.queue.qsize()))"},{"line_number":225,"context_line":"                self.run_task(task)"}],"source_content_type":"text/x-python","patch_set":3,"id":"3f79a3b5_9bdf0f68","line":222,"updated":"2018-08-14 10:40:35.000000000","message":"Maybe insert something in the message about actually running the task.","commit_id":"b8017104d5c0c2510198ef685140e70083319259"}]}
