)]}'
{"designate/zone_manager/service.py":[{"author":{"_account_id":741,"name":"Kiall Mac Innes","email":"kiall@macinnes.ie","username":"kiall"},"change_message_id":"3837ec916ccd39030b62fad3e145120a1669301e","unresolved":false,"context_lines":[{"line_number":34,"context_line":"    def __init__(self, threads\u003dNone):"},{"line_number":35,"context_line":"        super(Service, self).__init__(threads\u003dthreads)"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"        tasks.PeriodicTask.register_cfg_opts(NS)"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"        self._partitioner \u003d coordination.Partitioner("},{"line_number":40,"context_line":"            self._coordinator, self.service_name, self._coordination_id,"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba3cc151_538a861c","line":37,"updated":"2015-07-01 11:20:32.000000000","message":"This belongs in https://github.com/openstack/designate/blob/master/designate/utils.py#L105","commit_id":"cf5c8c6d26fce32e35843f1082e0d2d82c1c39aa"},{"author":{"_account_id":741,"name":"Kiall Mac Innes","email":"kiall@macinnes.ie","username":"kiall"},"change_message_id":"3837ec916ccd39030b62fad3e145120a1669301e","unresolved":false,"context_lines":[{"line_number":40,"context_line":"            self._coordinator, self.service_name, self._coordination_id,"},{"line_number":41,"context_line":"            range(0, 4095))"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"        self.storage \u003d storage.get_storage(CONF[\u0027service:mdns\u0027].storage_driver)"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    def _rebalance(self, my_partitions, members, event):"},{"line_number":46,"context_line":"        LOG.info(_LI(\"Received rebalance event %s\") % event)"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba3cc151_13971e3b","line":43,"updated":"2015-07-01 11:20:32.000000000","message":"Zone Manager shouldn\u0027t have direct DB access, it should use Central\u0027s RPC API, and certainly shouldn\u0027t be reusing mDNS\u0027s configuration options.\n\nAlso - Since some tasks might need central, others might need central and mdns, etc, we should load the CentralAPI instances etc inside the tasks where they are needed.","commit_id":"cf5c8c6d26fce32e35843f1082e0d2d82c1c39aa"},{"author":{"_account_id":741,"name":"Kiall Mac Innes","email":"kiall@macinnes.ie","username":"kiall"},"change_message_id":"3837ec916ccd39030b62fad3e145120a1669301e","unresolved":false,"context_lines":[{"line_number":51,"context_line":"        self._partitioner.start()"},{"line_number":52,"context_line":"        self._partitioner.watch_partition_change(self._rebalance)"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"        notifier \u003d rpc.get_notifier(self.service_name)"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"        for task in tasks.PeriodicTask.get_extensions():"},{"line_number":57,"context_line":"            LOG.debug(\"Registering task %s\" % task)"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba3cc151_13ae3e81","line":54,"updated":"2015-07-01 11:20:32.000000000","message":"Why is this here rather than inside the task? If it\u0027s only for the service-name, the tasks are only loaded into 1 service, with a well-known-name, we can just write out the name inside the task. Not every task will need to emit notifications, so we shouldn\u0027t do this here!","commit_id":"cf5c8c6d26fce32e35843f1082e0d2d82c1c39aa"}],"designate/zone_manager/tasks.py":[{"author":{"_account_id":741,"name":"Kiall Mac Innes","email":"kiall@macinnes.ie","username":"kiall"},"change_message_id":"3837ec916ccd39030b62fad3e145120a1669301e","unresolved":false,"context_lines":[{"line_number":27,"context_line":""},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"class PeriodicTask(plugin.ExtensionPlugin):"},{"line_number":30,"context_line":"    __plugin_ns__ \u003d \u0027designate.periodic_tasks\u0027"},{"line_number":31,"context_line":"    __plugin_type__ \u003d \u0027task\u0027"},{"line_number":32,"context_line":"    __interval__ \u003d None"},{"line_number":33,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"ba3cc151_5314c69e","line":30,"updated":"2015-07-01 11:20:32.000000000","message":"Since these tasks are unique to zone-manager, and pool-manager will likely get the same patterns applied to it, we\u0027ll need to make this descriptive. \"designate.zone_manager_tasks\" seems appropriate?","commit_id":"cf5c8c6d26fce32e35843f1082e0d2d82c1c39aa"},{"author":{"_account_id":741,"name":"Kiall Mac Innes","email":"kiall@macinnes.ie","username":"kiall"},"change_message_id":"3837ec916ccd39030b62fad3e145120a1669301e","unresolved":false,"context_lines":[{"line_number":28,"context_line":""},{"line_number":29,"context_line":"class PeriodicTask(plugin.ExtensionPlugin):"},{"line_number":30,"context_line":"    __plugin_ns__ \u003d \u0027designate.periodic_tasks\u0027"},{"line_number":31,"context_line":"    __plugin_type__ \u003d \u0027task\u0027"},{"line_number":32,"context_line":"    __interval__ \u003d None"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"    def __init__(self, storage, notifier):"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba3cc151_537b66f5","line":31,"updated":"2015-07-01 11:20:32.000000000","message":"Again, more than just zone manager will have tasks - using [task:foo] as the config etc naming will mean conflicts. \"zone_manager_task\" would seem like a better option?","commit_id":"cf5c8c6d26fce32e35843f1082e0d2d82c1c39aa"},{"author":{"_account_id":741,"name":"Kiall Mac Innes","email":"kiall@macinnes.ie","username":"kiall"},"change_message_id":"3837ec916ccd39030b62fad3e145120a1669301e","unresolved":false,"context_lines":[{"line_number":60,"context_line":"        return [(group, options)]"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    def __call__(self):"},{"line_number":63,"context_line":"        LOG.info(i18n._LI(\"Emitting zone exist events for my partitions.\"))"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"        ctxt \u003d context.DesignateContext.get_admin_context()"},{"line_number":66,"context_line":"        ctxt.all_tenants \u003d True"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba3cc151_73f54a55","line":63,"updated":"2015-07-01 11:20:32.000000000","message":"Can we use the normal patterns for logging etc here? Import _LI directly, rather than using it through i18n.. Needlessly different code just increases cognitive overhead for anyone reading or updating it later. e.g. in 3 months someone else goes and adds a new task with a log message, They now have to stop and think - is it i18n._LI(), or _LI()?","commit_id":"cf5c8c6d26fce32e35843f1082e0d2d82c1c39aa"},{"author":{"_account_id":741,"name":"Kiall Mac Innes","email":"kiall@macinnes.ie","username":"kiall"},"change_message_id":"3837ec916ccd39030b62fad3e145120a1669301e","unresolved":false,"context_lines":[{"line_number":65,"context_line":"        ctxt \u003d context.DesignateContext.get_admin_context()"},{"line_number":66,"context_line":"        ctxt.all_tenants \u003d True"},{"line_number":67,"context_line":"        criterion \u003d self._filter_between(\u0027shard\u0027)"},{"line_number":68,"context_line":"        zones \u003d self.storage.find_domains(ctxt, criterion)"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"        interval \u003d datetime.timedelta(seconds\u003dself.options.interval)"},{"line_number":71,"context_line":"        audit_period_ending \u003d timeutils.utcnow()"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba3cc151_f3887ac7","line":68,"updated":"2015-07-01 11:20:32.000000000","message":"The number of domains here could be huge, we\u0027ll need to page through the results. e.g. ask for the first 100, then the next 100, etc over and over until you\u0027re out of results.","commit_id":"cf5c8c6d26fce32e35843f1082e0d2d82c1c39aa"},{"author":{"_account_id":741,"name":"Kiall Mac Innes","email":"kiall@macinnes.ie","username":"kiall"},"change_message_id":"7362eaa53679c46364f006fd6d5c06e6aeef069f","unresolved":false,"context_lines":[{"line_number":94,"context_line":"        }"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"        marker \u003d None"},{"line_number":97,"context_line":"        while True:"},{"line_number":98,"context_line":"            zones \u003d self.central_api.find_domains(ctxt, criterion,"},{"line_number":99,"context_line":"                                                  marker\u003dmarker,"},{"line_number":100,"context_line":"                                                  limit\u003dself.options.per_page)"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba3cc151_80a3f99d","line":97,"updated":"2015-07-07 11:51:39.000000000","message":"This will spin forever when there are zones found, rather than waiting for the next periodic interval in order to send events.","commit_id":"7d586e5831487ab49dac1a52343925daf476fcdd"},{"author":{"_account_id":741,"name":"Kiall Mac Innes","email":"kiall@macinnes.ie","username":"kiall"},"change_message_id":"b2c9d5441cf4b328e82ee5e68f08f7e20675d770","unresolved":false,"context_lines":[{"line_number":94,"context_line":"        }"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"        marker \u003d None"},{"line_number":97,"context_line":"        while True:"},{"line_number":98,"context_line":"            zones \u003d self.central_api.find_domains(ctxt, criterion,"},{"line_number":99,"context_line":"                                                  marker\u003dmarker,"},{"line_number":100,"context_line":"                                                  limit\u003dself.options.per_page)"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba3cc151_00184983","line":97,"in_reply_to":"ba3cc151_80a3f99d","updated":"2015-07-07 12:02:36.000000000","message":"Scratch that, just missed how it exited","commit_id":"7d586e5831487ab49dac1a52343925daf476fcdd"}]}
