)]}'
{"cloudkitty/orchestrator.py":[{"author":{"_account_id":21797,"name":"Jeremy Liu","display_name":"Jeremy Liu","email":"liujiong.cc@gmail.com","username":"liujiong"},"change_message_id":"2f5dd6a952693233c14463008fd10e57bb21d9ee","unresolved":false,"context_lines":[{"line_number":275,"context_line":"                for tenant in self._tenants[:]:"},{"line_number":276,"context_line":"                    lock \u003d self._lock(tenant)"},{"line_number":277,"context_line":"                    if lock.acquire(blocking\u003dFalse):"},{"line_number":278,"context_line":"                        worker \u003d Worker(self.collector, self.storage, tenant)"},{"line_number":279,"context_line":"                        start_timestamp \u003d worker.check_state()"},{"line_number":280,"context_line":"                        if start_timestamp:"},{"line_number":281,"context_line":"                            worker.run(start_timestamp)"},{"line_number":282,"context_line":"                        else:"},{"line_number":283,"context_line":"                            self._tenants.remove(tenant)"},{"line_number":284,"context_line":"                        lock.release()"},{"line_number":285,"context_line":"                    self.coord.heartbeat()"},{"line_number":286,"context_line":"                # NOTE(sheeprine): Slow down looping if all tenants are"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a430d35_6a888423","line":283,"range":{"start_line":278,"start_character":24,"end_line":283,"end_character":56},"updated":"2017-02-04 11:17:32.000000000","message":"Well, currently the logic is that we check the state of the tenant firstly before we initialize a worker.\nIn your logic, the worker is always initialized. You think it\u0027s better?","commit_id":"578d20bff96dfe7b7400d909fd904c46f7154111"}],"cloudkitty/utils.py":[{"author":{"_account_id":21797,"name":"Jeremy Liu","display_name":"Jeremy Liu","email":"liujiong.cc@gmail.com","username":"liujiong"},"change_message_id":"0bd6812e8c499311c078534f6b0b88adbd852ef6","unresolved":false,"context_lines":[{"line_number":181,"context_line":"        cache.clear()"},{"line_number":182,"context_line":""},{"line_number":183,"context_line":""},{"line_number":184,"context_line":"def check_time_state(storage, tenant_id, period\u003d0, wait_time\u003d0):"},{"line_number":185,"context_line":"    timestamp \u003d storage.get_state(tenant_id)"},{"line_number":186,"context_line":"    if not timestamp:"},{"line_number":187,"context_line":"        month_start \u003d get_month_start()"},{"line_number":188,"context_line":"        return dt2ts(month_start)"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a30ddce_64bfbefb","line":185,"range":{"start_line":184,"start_character":0,"end_line":185,"end_character":44},"updated":"2017-03-08 10:14:11.000000000","message":"This does not look like an util function !\nIt would make misleading if define here and like this.","commit_id":"a7b9cc6136066d08c2714cd5b6f04bcaf267b320"}]}
