)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"d445ad7c0792c663771bb4945c5b500fde72601b","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Remove __init__() from Daemon class"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"__init__() of Daemon class is not called in any sub classes. And"},{"line_number":10,"context_line":"Daemon is abstract class. Then, __init__() of Daemon is meaningless."},{"line_number":11,"context_line":"This patch removes __init__() from Daemon class."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: I0313f94b874ddb36d31df67e8c00fd3b9a26cbdb"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"9a89bdaa_e78844ea","line":10,"updated":"2016-09-05 13:20:23.000000000","message":"Nitpicking: I think Daemon() is not an abstract class. For example, I can do the following (which should not be possible on an abstract class):\n\n \u003e\u003e\u003e from swift.common.daemon import Daemon\n \u003e\u003e\u003e d\u003dDaemon()\n\nMaybe you can re-phrase this a bit?","commit_id":"2b333401907d8ca10814e822e244a28eff22cb39"}],"swift/common/daemon.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"ee2ce7744382f1f8dea117d6e8365536e120380d","unresolved":false,"context_lines":[{"line_number":30,"context_line":"    def __init__(self, conf):"},{"line_number":31,"context_line":"        self.conf \u003d conf"},{"line_number":32,"context_line":"        self.logger \u003d utils.get_logger(conf, log_route\u003d\u0027daemon\u0027)"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"    def run_once(self, *args, **kwargs):"},{"line_number":35,"context_line":"        \"\"\"Override this to run the script once\"\"\""},{"line_number":36,"context_line":"        raise NotImplementedError(\u0027run_once not implemented\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a89bdaa_38084291","side":"PARENT","line":33,"updated":"2016-09-06 20:38:43.000000000","message":"Python\u0027s support for interfaces is pretty weak.  The existence of this method is meant to highlight that *at a minimum* a subclass isn\u0027t really a daemon unless it\u0027s has a conf and logger attribute.  Your subclass of Daemon must either use this __init__ or define a method that fulfills the contact [1]\n\nIn the run method below you can see that the implementation depends on it - unless the subclass also implements it\u0027s own run method.\n\n1. The contract is pretty straight forward - so all current subclasses just do it on their own while doing other __init__ stuff.  If it offends your sensibilities for DRYness you could refactor the implementations to use a base implementation that\u0027s more condusive to re-use.\nhttps://gist.github.com/clayg/556d47e938c1d7daa923b42529737b7e\n^ I only did the account-auditor; all the other daemons could/should follow suit","commit_id":"18fa28c6c9cfa166f915848cf224c9e0d2933d00"},{"author":{"_account_id":14766,"name":"Kazuhiro MIYAHARA","email":"miyahara.kazuhiro@lab.ntt.co.jp","username":"miyahara"},"change_message_id":"8f8df24c9d71229e6c75d41cba83daf40b69f065","unresolved":false,"context_lines":[{"line_number":30,"context_line":"    def __init__(self, conf):"},{"line_number":31,"context_line":"        self.conf \u003d conf"},{"line_number":32,"context_line":"        self.logger \u003d utils.get_logger(conf, log_route\u003d\u0027daemon\u0027)"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"    def run_once(self, *args, **kwargs):"},{"line_number":35,"context_line":"        \"\"\"Override this to run the script once\"\"\""},{"line_number":36,"context_line":"        raise NotImplementedError(\u0027run_once not implemented\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a89bdaa_44bd1cb6","side":"PARENT","line":33,"in_reply_to":"9a89bdaa_38084291","updated":"2016-09-07 01:53:03.000000000","message":"Clay, thank you for your comments.\nYour suggestion sounds great. I will update my patch.","commit_id":"18fa28c6c9cfa166f915848cf224c9e0d2933d00"}]}
