)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":9796,"name":"ChangBo Guo","email":"glongwave@gmail.com","username":"gcb"},"change_message_id":"2e222495b4a8d2fcca2e24f0c07ebaa815cc2f90","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Ivan Kolodyazhny \u003ce0ne@e0ne.info\u003e"},{"line_number":5,"context_line":"CommitDate: 2016-01-20 13:31:02 +0200"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Use file modification events instead of signal handler"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Change-Id: I6ef02457f21da8e6fbd50e57bfa503b3c31ddd76"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"9a68dd71_34245e5c","line":7,"range":{"start_line":7,"start_character":47,"end_line":7,"end_character":54},"updated":"2016-01-25 05:58:26.000000000","message":"From your code, this not a replacement, just provide another way to get report. We\u0027d better add more information about the change, and description about new config options.","commit_id":"0199456409205e7fdc79a8cf30585da63454b747"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"0fcdd73b0c2bbe22f28fefb917e0ea06df8f53ab","unresolved":false,"context_lines":[{"line_number":11,"context_line":"\u0027touch file\u0027 event instead of signal."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Alternative solutions:"},{"line_number":14,"context_line":"1) watchdog: can monitor only directories, has issues with eventlet."},{"line_number":15,"context_line":"2) inotify: works only with linux-based systems."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"[1]"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":15,"id":"9abb7d3a_9f6856bc","line":14,"updated":"2016-06-03 10:15:21.000000000","message":"nit: it would be nice to provide links to those too","commit_id":"52e0492ba7537842b87b921e7b6a12a4a8b6cb11"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"ee0f49ec502c62fc989342d4ab069a264e5df3ac","unresolved":false,"context_lines":[{"line_number":11,"context_line":"\u0027touch file\u0027 event instead of signal."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Alternative solutions:"},{"line_number":14,"context_line":"1) watchdog: can monitor only directories, has issues with eventlet."},{"line_number":15,"context_line":"2) inotify: works only with linux-based systems."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"[1]"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":15,"id":"7aa08908_b6641722","line":14,"in_reply_to":"9abb7d3a_9f6856bc","updated":"2016-06-13 14:32:04.000000000","message":"Done","commit_id":"52e0492ba7537842b87b921e7b6a12a4a8b6cb11"}],"oslo_reports/guru_meditation_report.py":[{"author":{"_account_id":16051,"name":"Ronald Bradford","email":"ronald.bradford@gmail.com","username":"ronaldbradford"},"change_message_id":"82956f9e73337be96c37cef3d8e337edc6d7fdef","unresolved":false,"context_lines":[{"line_number":164,"context_line":"                            log_dir):"},{"line_number":165,"context_line":"        # NOTE(e0ne): import optional dependency"},{"line_number":166,"context_line":"        try:"},{"line_number":167,"context_line":"            import eventlet"},{"line_number":168,"context_line":"        except ImportError:"},{"line_number":169,"context_line":"            print(\"Unable to import eventlet\", file\u003dsys.stderr)"},{"line_number":170,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a7b0d38_96bb5c72","line":167,"range":{"start_line":167,"start_character":12,"end_line":167,"end_character":18},"updated":"2015-12-23 16:56:23.000000000","message":"Another way to achieve this using Oslo library.\n\nfrom oslo_utils import importutils\n\nif not importutils.try_import(\u0027eventlet\u0027):\n    return","commit_id":"c6a27551190503345b317a6c34bd6bed5b6143ea"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"ca49b59c31e381e0a52a88bb39501367818ece5b","unresolved":false,"context_lines":[{"line_number":164,"context_line":"                            log_dir):"},{"line_number":165,"context_line":"        # NOTE(e0ne): import optional dependency"},{"line_number":166,"context_line":"        try:"},{"line_number":167,"context_line":"            import eventlet"},{"line_number":168,"context_line":"        except ImportError:"},{"line_number":169,"context_line":"            print(\"Unable to import eventlet\", file\u003dsys.stderr)"},{"line_number":170,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a7b0d38_d4c47741","line":167,"range":{"start_line":167,"start_character":12,"end_line":167,"end_character":18},"in_reply_to":"1a7b0d38_96bb5c72","updated":"2015-12-23 20:16:46.000000000","message":"Thanks for suggestion, will do it in a following patch","commit_id":"c6a27551190503345b317a6c34bd6bed5b6143ea"},{"author":{"_account_id":16051,"name":"Ronald Bradford","email":"ronald.bradford@gmail.com","username":"ronaldbradford"},"change_message_id":"82956f9e73337be96c37cef3d8e337edc6d7fdef","unresolved":false,"context_lines":[{"line_number":166,"context_line":"        try:"},{"line_number":167,"context_line":"            import eventlet"},{"line_number":168,"context_line":"        except ImportError:"},{"line_number":169,"context_line":"            print(\"Unable to import eventlet\", file\u003dsys.stderr)"},{"line_number":170,"context_line":"            return"},{"line_number":171,"context_line":""},{"line_number":172,"context_line":"        def _handler():"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a7b0d38_6a09242c","line":169,"updated":"2015-12-23 16:56:23.000000000","message":"You use print here. Should this not be a LOG message as logging is defined based on calling if/else statement using logging.","commit_id":"c6a27551190503345b317a6c34bd6bed5b6143ea"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"ca49b59c31e381e0a52a88bb39501367818ece5b","unresolved":false,"context_lines":[{"line_number":166,"context_line":"        try:"},{"line_number":167,"context_line":"            import eventlet"},{"line_number":168,"context_line":"        except ImportError:"},{"line_number":169,"context_line":"            print(\"Unable to import eventlet\", file\u003dsys.stderr)"},{"line_number":170,"context_line":"            return"},{"line_number":171,"context_line":""},{"line_number":172,"context_line":"        def _handler():"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a7b0d38_34c85b55","line":169,"in_reply_to":"1a7b0d38_6a09242c","updated":"2015-12-23 20:16:46.000000000","message":"You\u0027re right, Ronald. I have to use logging here","commit_id":"c6a27551190503345b317a6c34bd6bed5b6143ea"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"aa99b1fe1d5ad4c42d648077f6b0a33a4c7fc72e","unresolved":false,"context_lines":[{"line_number":143,"context_line":"            cls._setup_signal(signum, version, service_name, log_dir)"},{"line_number":144,"context_line":"            return"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"        if conf and conf.file_signal:"},{"line_number":147,"context_line":"            cls._setup_file_handler(conf.file_signal,"},{"line_number":148,"context_line":"                                    conf.file_signal_interval, version,"},{"line_number":149,"context_line":"                                    service_name, log_dir)"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a7b0d38_c02e9542","line":146,"updated":"2015-12-28 16:20:56.000000000","message":"The options for this library are registered in the oslo_reports group, so you have to access this as conf.oslo_reports.file_signal.","commit_id":"a07bf484794bc686f1969e94b4a1fa5df0f552f8"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"aa99b1fe1d5ad4c42d648077f6b0a33a4c7fc72e","unresolved":false,"context_lines":[{"line_number":145,"context_line":""},{"line_number":146,"context_line":"        if conf and conf.file_signal:"},{"line_number":147,"context_line":"            cls._setup_file_handler(conf.file_signal,"},{"line_number":148,"context_line":"                                    conf.file_signal_interval, version,"},{"line_number":149,"context_line":"                                    service_name, log_dir)"},{"line_number":150,"context_line":"        else:"},{"line_number":151,"context_line":"            if hasattr(signal, \u0027SIGUSR1\u0027):"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a7b0d38_40238556","line":148,"updated":"2015-12-28 16:20:56.000000000","message":"This should be conf.oslo_reports.file_signal_interval.","commit_id":"a07bf484794bc686f1969e94b4a1fa5df0f552f8"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"aa99b1fe1d5ad4c42d648077f6b0a33a4c7fc72e","unresolved":false,"context_lines":[{"line_number":167,"context_line":"        # NOTE(e0ne): import optional dependency"},{"line_number":168,"context_line":"        eventlet \u003d importutils.try_import(\u0027eventlet\u0027)"},{"line_number":169,"context_line":"        if not eventlet:"},{"line_number":170,"context_line":"            LOG.warning(_LE(\"Unable to import eventlet\"))"},{"line_number":171,"context_line":"            return"},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"        def _handler():"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a7b0d38_606801ba","line":170,"updated":"2015-12-28 16:20:56.000000000","message":"This log message is mixing warning and error levels. It should either be LOG.error(_LE(...)) or LOG.warning(_LW(...)).\n\nThe text of the message could more clearly say that because of the failure the reports system is not going to be enabled at all.","commit_id":"a07bf484794bc686f1969e94b4a1fa5df0f552f8"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"aa99b1fe1d5ad4c42d648077f6b0a33a4c7fc72e","unresolved":false,"context_lines":[{"line_number":175,"context_line":"            while True:"},{"line_number":176,"context_line":"                s \u003d os.stat(filepath)"},{"line_number":177,"context_line":"                if s.st_mtime \u003e mtime:"},{"line_number":178,"context_line":"                    cls.handle_signal(version, service_name, log_dir, None)"},{"line_number":179,"context_line":"                eventlet.sleep(interval)"},{"line_number":180,"context_line":"        eventlet.spawn(_handler)"},{"line_number":181,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"1a7b0d38_e0895176","line":178,"updated":"2015-12-28 16:20:56.000000000","message":"I think here you also want to reset mtime, don\u0027t you? Otherwise, every time through the loop after the first modification to the file a new report will be generated.","commit_id":"a07bf484794bc686f1969e94b4a1fa5df0f552f8"},{"author":{"_account_id":5638,"name":"Davanum Srinivas","email":"davanum@gmail.com","username":"dims-v"},"change_message_id":"374df31428056d04a21ba6eca7dc47299f58f017","unresolved":false,"context_lines":[{"line_number":146,"context_line":"            cls._setup_signal(signum, version, service_name, log_dir)"},{"line_number":147,"context_line":"            return"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"        if conf and conf.oslo_reports.file_event_handler:"},{"line_number":150,"context_line":"            cls._setup_file_handler("},{"line_number":151,"context_line":"                conf.oslo_reports.file_event_handler,"},{"line_number":152,"context_line":"                conf.oslo_reports.file_event_handler_interval,"}],"source_content_type":"text/x-python","patch_set":4,"id":"da6ed579_ab10a85a","line":149,"updated":"2016-01-16 01:22:27.000000000","message":"if we don\u0027t have eventlet, shouldn\u0027t we fail fast with a decent error message?","commit_id":"97f66c615645f91b98064f2a63614123039db69d"},{"author":{"_account_id":5638,"name":"Davanum Srinivas","email":"davanum@gmail.com","username":"dims-v"},"change_message_id":"374df31428056d04a21ba6eca7dc47299f58f017","unresolved":false,"context_lines":[{"line_number":147,"context_line":"            return"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"        if conf and conf.oslo_reports.file_event_handler:"},{"line_number":150,"context_line":"            cls._setup_file_handler("},{"line_number":151,"context_line":"                conf.oslo_reports.file_event_handler,"},{"line_number":152,"context_line":"                conf.oslo_reports.file_event_handler_interval,"},{"line_number":153,"context_line":"                version, service_name, log_dir)"}],"source_content_type":"text/x-python","patch_set":4,"id":"da6ed579_463323f7","line":150,"updated":"2016-01-16 01:22:27.000000000","message":"We should sanity check for the existence of the file and the permissions too right?","commit_id":"97f66c615645f91b98064f2a63614123039db69d"},{"author":{"_account_id":5638,"name":"Davanum Srinivas","email":"davanum@gmail.com","username":"dims-v"},"change_message_id":"374df31428056d04a21ba6eca7dc47299f58f017","unresolved":false,"context_lines":[{"line_number":185,"context_line":"        def _handler():"},{"line_number":186,"context_line":"            mtime \u003d int(datetime.datetime.now().strftime(\"%s\"))"},{"line_number":187,"context_line":"            while True:"},{"line_number":188,"context_line":"                cls._check_for_file_changes(mtime, filepath, interval,"},{"line_number":189,"context_line":"                                            version, service_name, log_dir)"},{"line_number":190,"context_line":"        eventlet.spawn(_handler)"},{"line_number":191,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"da6ed579_a63d3fbd","line":188,"updated":"2016-01-16 01:22:27.000000000","message":"what if we break out of this loop because of an errant exception. Say the end user does a chmod on the file to lock permissions or of there\u0027s an exception thrown from eventlet do log that or do we add more try/catch to keep re-trying?","commit_id":"97f66c615645f91b98064f2a63614123039db69d"},{"author":{"_account_id":9796,"name":"ChangBo Guo","email":"glongwave@gmail.com","username":"gcb"},"change_message_id":"2e222495b4a8d2fcca2e24f0c07ebaa815cc2f90","unresolved":false,"context_lines":[{"line_number":92,"context_line":"    This class is a base class for Guru Meditation Reports."},{"line_number":93,"context_line":"    It provides facilities for registering sections and"},{"line_number":94,"context_line":"    setting up functionality to auto-run the report on"},{"line_number":95,"context_line":"    a certain signal."},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"    This class should always be used in conjunction with"},{"line_number":98,"context_line":"    a Report class via multiple inheritance.  It should"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a68dd71_d4d94258","line":95,"range":{"start_line":95,"start_character":20,"end_line":95,"end_character":21},"updated":"2016-01-25 05:58:26.000000000","message":"add something about your change here ?","commit_id":"0199456409205e7fdc79a8cf30585da63454b747"},{"author":{"_account_id":9796,"name":"ChangBo Guo","email":"glongwave@gmail.com","username":"gcb"},"change_message_id":"2e222495b4a8d2fcca2e24f0c07ebaa815cc2f90","unresolved":false,"context_lines":[{"line_number":132,"context_line":""},{"line_number":133,"context_line":"        This method sets up the Guru Meditation Report to automatically"},{"line_number":134,"context_line":"        get dumped to stderr or a file in a given dir when the given signal"},{"line_number":135,"context_line":"        is received."},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"        :param version: the version object for the current product"},{"line_number":138,"context_line":"        :param service_name: this program name used to construct logfile name"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a68dd71_74dc1646","line":135,"range":{"start_line":135,"start_character":19,"end_line":135,"end_character":20},"updated":"2016-01-25 05:58:26.000000000","message":"add something about your change here ?","commit_id":"0199456409205e7fdc79a8cf30585da63454b747"},{"author":{"_account_id":9796,"name":"ChangBo Guo","email":"glongwave@gmail.com","username":"gcb"},"change_message_id":"2e222495b4a8d2fcca2e24f0c07ebaa815cc2f90","unresolved":false,"context_lines":[{"line_number":148,"context_line":"            cls._setup_signal(signum, version, service_name, log_dir)"},{"line_number":149,"context_line":"            return"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"        if conf and conf.oslo_reports.file_event_handler:"},{"line_number":152,"context_line":"            cls._setup_file_handler("},{"line_number":153,"context_line":"                conf.oslo_reports.file_event_handler,"},{"line_number":154,"context_line":"                conf.oslo_reports.file_event_handler_interval,"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a68dd71_c8d3e65e","line":151,"range":{"start_line":151,"start_character":56,"end_line":151,"end_character":57},"updated":"2016-01-25 05:58:26.000000000","message":"Here conf.oslo_report.file_event_handler has side effect: disable the signal way. \nThis will confuse deployers, if we don\u0027t provide more information in help message of config file_event_handler.\n\nAnother way provide a switch config option to tell deployer which way is enable.\n\n\nOne more question: Is it possible make two ways work together ?","commit_id":"0199456409205e7fdc79a8cf30585da63454b747"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"0a52f978e8dcbea97b68bcd1870ab69ce0465c08","unresolved":false,"context_lines":[{"line_number":148,"context_line":"            cls._setup_signal(signum, version, service_name, log_dir)"},{"line_number":149,"context_line":"            return"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"        if conf and conf.oslo_reports.file_event_handler:"},{"line_number":152,"context_line":"            cls._setup_file_handler("},{"line_number":153,"context_line":"                conf.oslo_reports.file_event_handler,"},{"line_number":154,"context_line":"                conf.oslo_reports.file_event_handler_interval,"}],"source_content_type":"text/x-python","patch_set":5,"id":"7a5de9d1_1f47264c","line":151,"range":{"start_line":151,"start_character":56,"end_line":151,"end_character":57},"in_reply_to":"9a68dd71_c8d3e65e","updated":"2016-01-29 20:49:06.000000000","message":"I think it\u0027s OK to have the new option disable signal handling, without having to have another option, if that\u0027s what we want to do. I\u0027m not sure whether we want signal handlers and file monitors to both be enabled.","commit_id":"0199456409205e7fdc79a8cf30585da63454b747"},{"author":{"_account_id":9796,"name":"ChangBo Guo","email":"glongwave@gmail.com","username":"gcb"},"change_message_id":"2e222495b4a8d2fcca2e24f0c07ebaa815cc2f90","unresolved":false,"context_lines":[{"line_number":173,"context_line":"        stat \u003d os.stat(filepath)"},{"line_number":174,"context_line":"        if stat.st_mtime \u003e init_time:"},{"line_number":175,"context_line":"            cls.handle_signal(version, service_name, log_dir, None)"},{"line_number":176,"context_line":"            init_time \u003d int(datetime.datetime.now().strftime(\"%s\"))"},{"line_number":177,"context_line":"        eventlet.sleep(interval)"},{"line_number":178,"context_line":""},{"line_number":179,"context_line":"    @classmethod"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a68dd71_142a7a90","line":176,"range":{"start_line":176,"start_character":64,"end_line":176,"end_character":67},"updated":"2016-01-25 05:58:26.000000000","message":"There are at least two conventions, datetime -\u003e \u0027str\u0027-\u003e int.\n\nI think we can use time.time() directly, it returns a float, we can compare float with integer in line174.\n\ntime.time() get better performance:\n\n[changboguo@localhost oslo.utils]$  python -m timeit \"import datetime; datetime.datetime.now().strftime(\u0027%s\u0027)\"\n100000 loops, best of 3: 6.42 usec per loop\n[changboguo@localhost oslo.utils]$  python -m timeit \"import time; time.time()\"\n1000000 loops, best of 3: 0.426 usec per loop","commit_id":"0199456409205e7fdc79a8cf30585da63454b747"},{"author":{"_account_id":9796,"name":"ChangBo Guo","email":"glongwave@gmail.com","username":"gcb"},"change_message_id":"2e222495b4a8d2fcca2e24f0c07ebaa815cc2f90","unresolved":false,"context_lines":[{"line_number":179,"context_line":"    @classmethod"},{"line_number":180,"context_line":"    def _setup_file_handler(cls, filepath, interval, version, service_name,"},{"line_number":181,"context_line":"                            log_dir):"},{"line_number":182,"context_line":"        if not eventlet:"},{"line_number":183,"context_line":"            LOG.error(_LE(\"Unable to import eventlet\"))"},{"line_number":184,"context_line":"            return"},{"line_number":185,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"9a68dd71_14bfdaaa","line":182,"range":{"start_line":182,"start_character":23,"end_line":182,"end_character":24},"updated":"2016-01-25 05:58:26.000000000","message":"importutils.try_import return None if can\u0027t import the module,\nso use\n\nif eventlet is not None: ?","commit_id":"0199456409205e7fdc79a8cf30585da63454b747"},{"author":{"_account_id":9796,"name":"ChangBo Guo","email":"glongwave@gmail.com","username":"gcb"},"change_message_id":"2e222495b4a8d2fcca2e24f0c07ebaa815cc2f90","unresolved":false,"context_lines":[{"line_number":189,"context_line":"                          \"permissions to \u0027%s\u0027 file.\"), filepath)"},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"        def _handler():"},{"line_number":192,"context_line":"            mtime \u003d int(datetime.datetime.now().strftime(\"%s\"))"},{"line_number":193,"context_line":"            while True:"},{"line_number":194,"context_line":"                try:"},{"line_number":195,"context_line":"                    cls._check_for_file_changes(mtime, filepath, interval,"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a68dd71_d41e226f","line":192,"range":{"start_line":192,"start_character":60,"end_line":192,"end_character":63},"updated":"2016-01-25 05:58:26.000000000","message":"use time.time() directly ?","commit_id":"0199456409205e7fdc79a8cf30585da63454b747"},{"author":{"_account_id":9796,"name":"ChangBo Guo","email":"glongwave@gmail.com","username":"gcb"},"change_message_id":"2e222495b4a8d2fcca2e24f0c07ebaa815cc2f90","unresolved":false,"context_lines":[{"line_number":198,"context_line":"                    LOG.exception(_LE(\"Guru Meditation Report cannot read \""},{"line_number":199,"context_line":"                                      \"\u0027%s\u0027 file.\"), filepath)"},{"line_number":200,"context_line":""},{"line_number":201,"context_line":"        eventlet.spawn(_handler)"},{"line_number":202,"context_line":""},{"line_number":203,"context_line":"    @classmethod"},{"line_number":204,"context_line":"    def _setup_signal(cls, signum, version, service_name, log_dir):"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a68dd71_94842a0b","line":201,"range":{"start_line":201,"start_character":31,"end_line":201,"end_character":32},"updated":"2016-01-25 05:58:26.000000000","message":"use eventlet.spawn_n if we don\u0027t need the returned GreenThread, that\u0027s also get better performance.","commit_id":"0199456409205e7fdc79a8cf30585da63454b747"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"76aaffedafb83c67614ac52042608bd3470fc544","unresolved":false,"context_lines":[{"line_number":174,"context_line":"        stat \u003d os.stat(filepath)"},{"line_number":175,"context_line":"        if stat.st_mtime \u003e init_time:"},{"line_number":176,"context_line":"            cls.handle_signal(version, service_name, log_dir, None)"},{"line_number":177,"context_line":"            init_time \u003d time.time()"},{"line_number":178,"context_line":"        eventlet.sleep(interval)"},{"line_number":179,"context_line":""},{"line_number":180,"context_line":"    @classmethod"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a57f1b5_4a2dbe93","line":177,"updated":"2016-02-12 16:11:03.000000000","message":"Resetting the variable here isn\u0027t going to have any effect, because it only changes the value inside of this function. If you always return init_time then the loop in _handler can reset the variable being passed into this function.","commit_id":"f1af29791b57cb1db32c3db8d71e192741e5ef52"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"76aaffedafb83c67614ac52042608bd3470fc544","unresolved":false,"context_lines":[{"line_number":175,"context_line":"        if stat.st_mtime \u003e init_time:"},{"line_number":176,"context_line":"            cls.handle_signal(version, service_name, log_dir, None)"},{"line_number":177,"context_line":"            init_time \u003d time.time()"},{"line_number":178,"context_line":"        eventlet.sleep(interval)"},{"line_number":179,"context_line":""},{"line_number":180,"context_line":"    @classmethod"},{"line_number":181,"context_line":"    def _setup_file_handler(cls, filepath, interval, version, service_name,"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a57f1b5_c70be728","line":178,"updated":"2016-02-12 16:11:03.000000000","message":"This function is doing 2 things, checking for changes and then sleeping. The sleep is part of the looping logic, and should move down to _handler() where the loop is.","commit_id":"f1af29791b57cb1db32c3db8d71e192741e5ef52"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"76aaffedafb83c67614ac52042608bd3470fc544","unresolved":false,"context_lines":[{"line_number":190,"context_line":"                          \"permissions to \u0027%s\u0027 file.\"), filepath)"},{"line_number":191,"context_line":""},{"line_number":192,"context_line":"        def _handler():"},{"line_number":193,"context_line":"            mtime \u003d time.time()"},{"line_number":194,"context_line":"            while True:"},{"line_number":195,"context_line":"                try:"},{"line_number":196,"context_line":"                    cls._check_for_file_changes(mtime, filepath, interval,"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a57f1b5_677f93ab","line":193,"updated":"2016-02-12 16:11:03.000000000","message":"The value of mtime needs to be reset inside the loop if _check_for_file_changes detects a change. It would help if you called the variable init_time here, since that\u0027s how it\u0027s used.","commit_id":"f1af29791b57cb1db32c3db8d71e192741e5ef52"},{"author":{"_account_id":9796,"name":"ChangBo Guo","email":"glongwave@gmail.com","username":"gcb"},"change_message_id":"2ac6758aa80f9ebdb0871af76ff311445ed6435d","unresolved":false,"context_lines":[{"line_number":92,"context_line":"    This class is a base class for Guru Meditation Reports."},{"line_number":93,"context_line":"    It provides facilities for registering sections and"},{"line_number":94,"context_line":"    setting up functionality to auto-run the report on"},{"line_number":95,"context_line":"    a certain signal or use."},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"    This class should always be used in conjunction with"},{"line_number":98,"context_line":"    a Report class via multiple inheritance.  It should"}],"source_content_type":"text/x-python","patch_set":8,"id":"dae33548_17531e18","line":95,"range":{"start_line":95,"start_character":27,"end_line":95,"end_character":28},"updated":"2016-02-18 08:54:59.000000000","message":"use file modification events.\n\nMaybe we can provide more details information here.","commit_id":"08a1574f0ab1f7eacf47a5ea1e2110f47f24638b"},{"author":{"_account_id":8688,"name":"Alexis Lee","email":"openstack@lxsli.co.uk","username":"lxsli"},"change_message_id":"596526c9b32809c770d133bbe0d23d426688bd75","unresolved":false,"context_lines":[{"line_number":92,"context_line":"    This class is a base class for Guru Meditation Reports."},{"line_number":93,"context_line":"    It provides facilities for registering sections and"},{"line_number":94,"context_line":"    setting up functionality to auto-run the report on"},{"line_number":95,"context_line":"    a certain signal or use use file modification events."},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"    This class should always be used in conjunction with"},{"line_number":98,"context_line":"    a Report class via multiple inheritance.  It should"}],"source_content_type":"text/x-python","patch_set":9,"id":"dae33548_d94c29a0","line":95,"range":{"start_line":95,"start_character":24,"end_line":95,"end_character":31},"updated":"2016-02-19 13:30:45.000000000","message":"nit: s/use use/use/","commit_id":"8b516a4ef2dc8d4c8aca80e8142b4929037d0af4"},{"author":{"_account_id":8688,"name":"Alexis Lee","email":"openstack@lxsli.co.uk","username":"lxsli"},"change_message_id":"596526c9b32809c770d133bbe0d23d426688bd75","unresolved":false,"context_lines":[{"line_number":157,"context_line":"        else:"},{"line_number":158,"context_line":"            if hasattr(signal, \u0027SIGUSR1\u0027):"},{"line_number":159,"context_line":"                # TODO(dims) We need to remove this in the \"O\" release cycle"},{"line_number":160,"context_line":"                LOG.warning(_LW(\"Guru mediation now registers SIGUSR1 and \""},{"line_number":161,"context_line":"                                \"SIGUSR2 by default for backward \""},{"line_number":162,"context_line":"                                \"compatibility. SIGUSR1 will no longer be \""},{"line_number":163,"context_line":"                                \"registered in a future release, so please \""}],"source_content_type":"text/x-python","patch_set":9,"id":"bae84128_d24b4258","line":160,"range":{"start_line":160,"start_character":38,"end_line":160,"end_character":47},"updated":"2016-02-19 13:30:45.000000000","message":"nit: would you mind fixing s/mediation/meditation/ while you\u0027re working near this code please?","commit_id":"8b516a4ef2dc8d4c8aca80e8142b4929037d0af4"},{"author":{"_account_id":8688,"name":"Alexis Lee","email":"openstack@lxsli.co.uk","username":"lxsli"},"change_message_id":"596526c9b32809c770d133bbe0d23d426688bd75","unresolved":false,"context_lines":[{"line_number":173,"context_line":"                                service_name, log_dir):"},{"line_number":174,"context_line":"        stat \u003d os.stat(filepath)"},{"line_number":175,"context_line":"        if stat.st_mtime \u003e init_time:"},{"line_number":176,"context_line":"            cls.handle_signal(version, service_name, log_dir, None)"},{"line_number":177,"context_line":"            return True"},{"line_number":178,"context_line":""},{"line_number":179,"context_line":"    @classmethod"}],"source_content_type":"text/x-python","patch_set":9,"id":"bae84128_5283b2cc","line":176,"updated":"2016-02-19 13:30:45.000000000","message":"a \u0027check\u0027 method shouldn\u0027t contain a side-effect, only return True/False","commit_id":"8b516a4ef2dc8d4c8aca80e8142b4929037d0af4"},{"author":{"_account_id":8688,"name":"Alexis Lee","email":"openstack@lxsli.co.uk","username":"lxsli"},"change_message_id":"596526c9b32809c770d133bbe0d23d426688bd75","unresolved":false,"context_lines":[{"line_number":181,"context_line":"                            log_dir):"},{"line_number":182,"context_line":"        if not eventlet:"},{"line_number":183,"context_line":"            LOG.error(_LE(\"Unable to import eventlet\"))"},{"line_number":184,"context_line":"            return"},{"line_number":185,"context_line":""},{"line_number":186,"context_line":"        st \u003d os.stat(filepath)"},{"line_number":187,"context_line":"        if not bool(st.st_mode \u0026 stat.S_IRGRP):"}],"source_content_type":"text/x-python","patch_set":9,"id":"bae84128_f22f66f4","line":184,"updated":"2016-02-19 13:30:45.000000000","message":"I\u0027d rather fail fast in this circumstance, since the user has explicitly asked for something impossible.","commit_id":"8b516a4ef2dc8d4c8aca80e8142b4929037d0af4"},{"author":{"_account_id":8688,"name":"Alexis Lee","email":"openstack@lxsli.co.uk","username":"lxsli"},"change_message_id":"087e587ff39f6ae0dbe0e61b40877da76f9fd6f1","unresolved":false,"context_lines":[{"line_number":172,"context_line":"    def _check_for_file_changes(cls, init_time, filepath, version,"},{"line_number":173,"context_line":"                                service_name, log_dir):"},{"line_number":174,"context_line":"        stat \u003d os.stat(filepath)"},{"line_number":175,"context_line":"        if stat.st_mtime \u003e init_time:"},{"line_number":176,"context_line":"            return True"},{"line_number":177,"context_line":"        else:"},{"line_number":178,"context_line":"            return False"}],"source_content_type":"text/x-python","patch_set":10,"id":"bae84128_7b233106","line":175,"updated":"2016-02-19 14:13:33.000000000","message":"you can just:\n\n  return stat.st_mtime \u003e init_time","commit_id":"dca6bedbe80fbbcee9d90554a2b74ab8eff70216"},{"author":{"_account_id":8688,"name":"Alexis Lee","email":"openstack@lxsli.co.uk","username":"lxsli"},"change_message_id":"d507567743fbf3140f80340bac4cffe3d121f881","unresolved":false,"context_lines":[{"line_number":195,"context_line":"                try:"},{"line_number":196,"context_line":"                    has_modifications \u003d cls._check_for_file_changes("},{"line_number":197,"context_line":"                        mtime, filepath, version, service_name, log_dir)"},{"line_number":198,"context_line":"                    if has_modifications:"},{"line_number":199,"context_line":"                        mtime \u003d time.time()"},{"line_number":200,"context_line":"                    eventlet.sleep(interval)"},{"line_number":201,"context_line":"                except Exception:"}],"source_content_type":"text/x-python","patch_set":10,"id":"bae84128_7b3cd12f","line":198,"updated":"2016-02-19 14:13:01.000000000","message":"You need this here:\n\n  cls.handle_signal(version, service_name, log_dir, None)","commit_id":"dca6bedbe80fbbcee9d90554a2b74ab8eff70216"},{"author":{"_account_id":8601,"name":"Dmitriy Ukhlov","email":"dukhlov@mirantis.com","username":"dukhlov"},"change_message_id":"e2489f6579fa6f518b14c9282d7400cd80ec8eab","unresolved":false,"context_lines":[{"line_number":81,"context_line":""},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"# NOTE(e0ne): import optional dependency"},{"line_number":84,"context_line":"eventlet \u003d importutils.try_import(\u0027eventlet\u0027)"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":87,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"bae84128_3578348f","line":84,"updated":"2016-02-22 15:48:11.000000000","message":"why don\u0027t use just threading module? if eventlet is patched it is greenlet but if not it works as native thread too","commit_id":"e7f27a6bf6046806de1328bff7205ff80ad96c1e"},{"author":{"_account_id":8601,"name":"Dmitriy Ukhlov","email":"dukhlov@mirantis.com","username":"dukhlov"},"change_message_id":"e2489f6579fa6f518b14c9282d7400cd80ec8eab","unresolved":false,"context_lines":[{"line_number":149,"context_line":"            cls._setup_signal(signum, version, service_name, log_dir)"},{"line_number":150,"context_line":"            return"},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"        if conf and conf.oslo_reports.file_event_handler:"},{"line_number":153,"context_line":"            cls._setup_file_handler("},{"line_number":154,"context_line":"                conf.oslo_reports.file_event_handler,"},{"line_number":155,"context_line":"                conf.oslo_reports.file_event_handler_interval,"}],"source_content_type":"text/x-python","patch_set":11,"id":"bae84128_7a710be0","line":152,"range":{"start_line":152,"start_character":16,"end_line":152,"end_character":19},"updated":"2016-02-22 15:48:11.000000000","message":"too many ifs. Is it possible to introduce some abstaction, like ReportHook with SygnalReportHook and FileEventReportHook and just register them in the cycle incide setup_autorun?","commit_id":"e7f27a6bf6046806de1328bff7205ff80ad96c1e"},{"author":{"_account_id":8688,"name":"Alexis Lee","email":"openstack@lxsli.co.uk","username":"lxsli"},"change_message_id":"8392e634a104178e1e30c245c9798a53dc1b15ac","unresolved":false,"context_lines":[{"line_number":129,"context_line":""},{"line_number":130,"context_line":"        This method sets up the Guru Meditation Report to automatically"},{"line_number":131,"context_line":"        get dumped to stderr or a file in a given dir when the given signal"},{"line_number":132,"context_line":"        is received. It also can use file modification events instead of"},{"line_number":133,"context_line":"        signals."},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"        :param version: the version object for the current product"}],"source_content_type":"text/x-python","patch_set":14,"id":"9abb7d3a_4a3ae9e8","line":132,"range":{"start_line":132,"start_character":24,"end_line":132,"end_character":32},"updated":"2016-06-02 13:58:33.000000000","message":"femtonit can also","commit_id":"60b346718f54f5956d3d7fb640dc954005ac6dd9"},{"author":{"_account_id":8688,"name":"Alexis Lee","email":"openstack@lxsli.co.uk","username":"lxsli"},"change_message_id":"8392e634a104178e1e30c245c9798a53dc1b15ac","unresolved":false,"context_lines":[{"line_number":167,"context_line":""},{"line_number":168,"context_line":"    @classmethod"},{"line_number":169,"context_line":"    def _check_for_file_changes(cls, init_time, filepath, version,"},{"line_number":170,"context_line":"                                service_name, log_dir):"},{"line_number":171,"context_line":"        stat \u003d os.stat(filepath)"},{"line_number":172,"context_line":"        return stat.st_mtime \u003e init_time"},{"line_number":173,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"9abb7d3a_959b5272","line":170,"updated":"2016-06-02 13:58:33.000000000","message":"this takes 3 unused params? Do we even need this method, it\u0027s very simple?","commit_id":"60b346718f54f5956d3d7fb640dc954005ac6dd9"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"e66186720728a4187f0391448588887adb9a0f30","unresolved":false,"context_lines":[{"line_number":167,"context_line":""},{"line_number":168,"context_line":"    @classmethod"},{"line_number":169,"context_line":"    def _check_for_file_changes(cls, init_time, filepath, version,"},{"line_number":170,"context_line":"                                service_name, log_dir):"},{"line_number":171,"context_line":"        stat \u003d os.stat(filepath)"},{"line_number":172,"context_line":"        return stat.st_mtime \u003e init_time"},{"line_number":173,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"9abb7d3a_8f3976db","line":170,"in_reply_to":"9abb7d3a_959b5272","updated":"2016-06-02 18:53:27.000000000","message":"Done","commit_id":"60b346718f54f5956d3d7fb640dc954005ac6dd9"},{"author":{"_account_id":8688,"name":"Alexis Lee","email":"openstack@lxsli.co.uk","username":"lxsli"},"change_message_id":"8392e634a104178e1e30c245c9798a53dc1b15ac","unresolved":false,"context_lines":[{"line_number":188,"context_line":"                        mtime, filepath, version, service_name, log_dir)"},{"line_number":189,"context_line":"                    if has_modifications:"},{"line_number":190,"context_line":"                        cls.handle_signal(version, service_name, log_dir, None)"},{"line_number":191,"context_line":"                        mtime \u003d time.time()"},{"line_number":192,"context_line":"                    time.sleep(interval)"},{"line_number":193,"context_line":"                except Exception:"},{"line_number":194,"context_line":"                    LOG.exception(_LE(\"Guru Meditation Report cannot read \""}],"source_content_type":"text/x-python","patch_set":14,"id":"9abb7d3a_9002400a","line":191,"updated":"2016-06-02 13:58:33.000000000","message":"we should take os.stat(filepath).st_mtime instead of calling time.time()","commit_id":"60b346718f54f5956d3d7fb640dc954005ac6dd9"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"e66186720728a4187f0391448588887adb9a0f30","unresolved":false,"context_lines":[{"line_number":188,"context_line":"                        mtime, filepath, version, service_name, log_dir)"},{"line_number":189,"context_line":"                    if has_modifications:"},{"line_number":190,"context_line":"                        cls.handle_signal(version, service_name, log_dir, None)"},{"line_number":191,"context_line":"                        mtime \u003d time.time()"},{"line_number":192,"context_line":"                    time.sleep(interval)"},{"line_number":193,"context_line":"                except Exception:"},{"line_number":194,"context_line":"                    LOG.exception(_LE(\"Guru Meditation Report cannot read \""}],"source_content_type":"text/x-python","patch_set":14,"id":"9abb7d3a_f76baf83","line":191,"in_reply_to":"9abb7d3a_9002400a","updated":"2016-06-02 18:53:27.000000000","message":"Why do we need it here?","commit_id":"60b346718f54f5956d3d7fb640dc954005ac6dd9"},{"author":{"_account_id":8688,"name":"Alexis Lee","email":"openstack@lxsli.co.uk","username":"lxsli"},"change_message_id":"8392e634a104178e1e30c245c9798a53dc1b15ac","unresolved":false,"context_lines":[{"line_number":190,"context_line":"                        cls.handle_signal(version, service_name, log_dir, None)"},{"line_number":191,"context_line":"                        mtime \u003d time.time()"},{"line_number":192,"context_line":"                    time.sleep(interval)"},{"line_number":193,"context_line":"                except Exception:"},{"line_number":194,"context_line":"                    LOG.exception(_LE(\"Guru Meditation Report cannot read \""},{"line_number":195,"context_line":"                                      \"\u0027%s\u0027 file.\"), filepath)"},{"line_number":196,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"9abb7d3a_5b3639e8","line":193,"range":{"start_line":193,"start_character":23,"end_line":193,"end_character":32},"updated":"2016-06-02 13:58:33.000000000","message":"OSError, no?","commit_id":"60b346718f54f5956d3d7fb640dc954005ac6dd9"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"e66186720728a4187f0391448588887adb9a0f30","unresolved":false,"context_lines":[{"line_number":190,"context_line":"                        cls.handle_signal(version, service_name, log_dir, None)"},{"line_number":191,"context_line":"                        mtime \u003d time.time()"},{"line_number":192,"context_line":"                    time.sleep(interval)"},{"line_number":193,"context_line":"                except Exception:"},{"line_number":194,"context_line":"                    LOG.exception(_LE(\"Guru Meditation Report cannot read \""},{"line_number":195,"context_line":"                                      \"\u0027%s\u0027 file.\"), filepath)"},{"line_number":196,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"9abb7d3a_370417c5","line":193,"range":{"start_line":193,"start_character":23,"end_line":193,"end_character":32},"in_reply_to":"9abb7d3a_5b3639e8","updated":"2016-06-02 18:53:27.000000000","message":"Done","commit_id":"60b346718f54f5956d3d7fb640dc954005ac6dd9"},{"author":{"_account_id":8688,"name":"Alexis Lee","email":"openstack@lxsli.co.uk","username":"lxsli"},"change_message_id":"8392e634a104178e1e30c245c9798a53dc1b15ac","unresolved":false,"context_lines":[{"line_number":192,"context_line":"                    time.sleep(interval)"},{"line_number":193,"context_line":"                except Exception:"},{"line_number":194,"context_line":"                    LOG.exception(_LE(\"Guru Meditation Report cannot read \""},{"line_number":195,"context_line":"                                      \"\u0027%s\u0027 file.\"), filepath)"},{"line_number":196,"context_line":""},{"line_number":197,"context_line":"        th \u003d threading.Thread(target\u003d_handler)"},{"line_number":198,"context_line":"        th.start()"}],"source_content_type":"text/x-python","patch_set":14,"id":"9abb7d3a_9bba6109","line":195,"updated":"2016-06-02 13:58:33.000000000","message":"we should at least time.sleep(interval) or we\u0027ll spin!","commit_id":"60b346718f54f5956d3d7fb640dc954005ac6dd9"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"e66186720728a4187f0391448588887adb9a0f30","unresolved":false,"context_lines":[{"line_number":192,"context_line":"                    time.sleep(interval)"},{"line_number":193,"context_line":"                except Exception:"},{"line_number":194,"context_line":"                    LOG.exception(_LE(\"Guru Meditation Report cannot read \""},{"line_number":195,"context_line":"                                      \"\u0027%s\u0027 file.\"), filepath)"},{"line_number":196,"context_line":""},{"line_number":197,"context_line":"        th \u003d threading.Thread(target\u003d_handler)"},{"line_number":198,"context_line":"        th.start()"}],"source_content_type":"text/x-python","patch_set":14,"id":"9abb7d3a_b74ac725","line":195,"in_reply_to":"9abb7d3a_9bba6109","updated":"2016-06-02 18:53:27.000000000","message":"Done","commit_id":"60b346718f54f5956d3d7fb640dc954005ac6dd9"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"0fcdd73b0c2bbe22f28fefb917e0ea06df8f53ab","unresolved":false,"context_lines":[{"line_number":166,"context_line":"                                  version, service_name, log_dir)"},{"line_number":167,"context_line":""},{"line_number":168,"context_line":"    @classmethod"},{"line_number":169,"context_line":"    def _check_for_file_changes(cls, init_time, filepath, version,"},{"line_number":170,"context_line":"                                service_name, log_dir):"},{"line_number":171,"context_line":"        stat \u003d os.stat(filepath)"},{"line_number":172,"context_line":"        return stat.st_mtime \u003e init_time"}],"source_content_type":"text/x-python","patch_set":15,"id":"9abb7d3a_bf443ab7","line":169,"updated":"2016-06-03 10:15:21.000000000","message":"is this used anywhere except tests?","commit_id":"52e0492ba7537842b87b921e7b6a12a4a8b6cb11"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"ee0f49ec502c62fc989342d4ab069a264e5df3ac","unresolved":false,"context_lines":[{"line_number":166,"context_line":"                                  version, service_name, log_dir)"},{"line_number":167,"context_line":""},{"line_number":168,"context_line":"    @classmethod"},{"line_number":169,"context_line":"    def _check_for_file_changes(cls, init_time, filepath, version,"},{"line_number":170,"context_line":"                                service_name, log_dir):"},{"line_number":171,"context_line":"        stat \u003d os.stat(filepath)"},{"line_number":172,"context_line":"        return stat.st_mtime \u003e init_time"}],"source_content_type":"text/x-python","patch_set":15,"id":"7aa08908_367947c9","line":169,"in_reply_to":"9abb7d3a_bf443ab7","updated":"2016-06-13 14:32:04.000000000","message":"Thanks, I\u0027ll remove it in a next patch","commit_id":"52e0492ba7537842b87b921e7b6a12a4a8b6cb11"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"0fcdd73b0c2bbe22f28fefb917e0ea06df8f53ab","unresolved":false,"context_lines":[{"line_number":177,"context_line":""},{"line_number":178,"context_line":"        st \u003d os.stat(filepath)"},{"line_number":179,"context_line":"        if not bool(st.st_mode \u0026 stat.S_IRGRP):"},{"line_number":180,"context_line":"            LOG.error(_LE(\"Guru Meditation Report does not have read \""},{"line_number":181,"context_line":"                          \"permissions to \u0027%s\u0027 file.\"), filepath)"},{"line_number":182,"context_line":""},{"line_number":183,"context_line":"        def _handler():"}],"source_content_type":"text/x-python","patch_set":15,"id":"9abb7d3a_3aae9898","line":180,"updated":"2016-06-03 10:15:21.000000000","message":"I wonder if we should raise an exception at this point and fail early instead of spamming logs with errors later from a created thread.\n\nHave you checked how similar software (e.g. uwsgi with touch-reload) behaves in this case?","commit_id":"52e0492ba7537842b87b921e7b6a12a4a8b6cb11"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"ee0f49ec502c62fc989342d4ab069a264e5df3ac","unresolved":false,"context_lines":[{"line_number":177,"context_line":""},{"line_number":178,"context_line":"        st \u003d os.stat(filepath)"},{"line_number":179,"context_line":"        if not bool(st.st_mode \u0026 stat.S_IRGRP):"},{"line_number":180,"context_line":"            LOG.error(_LE(\"Guru Meditation Report does not have read \""},{"line_number":181,"context_line":"                          \"permissions to \u0027%s\u0027 file.\"), filepath)"},{"line_number":182,"context_line":""},{"line_number":183,"context_line":"        def _handler():"}],"source_content_type":"text/x-python","patch_set":15,"id":"7aa08908_09122c57","line":180,"in_reply_to":"9abb7d3a_3aae9898","updated":"2016-06-13 14:32:04.000000000","message":"Done","commit_id":"52e0492ba7537842b87b921e7b6a12a4a8b6cb11"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"0fcdd73b0c2bbe22f28fefb917e0ea06df8f53ab","unresolved":false,"context_lines":[{"line_number":194,"context_line":"                finally:"},{"line_number":195,"context_line":"                    time.sleep(interval)"},{"line_number":196,"context_line":""},{"line_number":197,"context_line":"        th \u003d threading.Thread(target\u003d_handler)"},{"line_number":198,"context_line":"        th.start()"},{"line_number":199,"context_line":""},{"line_number":200,"context_line":"    @classmethod"}],"source_content_type":"text/x-python","patch_set":15,"id":"9abb7d3a_bf8efacd","line":197,"updated":"2016-06-03 10:15:21.000000000","message":"shouldn\u0027t we mark this thread as daemon (https://docs.python.org/2/library/threading.html#threading.Thread.daemon), so that we don\u0027t wait for it to finish when a process is terminated?","commit_id":"52e0492ba7537842b87b921e7b6a12a4a8b6cb11"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"ee0f49ec502c62fc989342d4ab069a264e5df3ac","unresolved":false,"context_lines":[{"line_number":194,"context_line":"                finally:"},{"line_number":195,"context_line":"                    time.sleep(interval)"},{"line_number":196,"context_line":""},{"line_number":197,"context_line":"        th \u003d threading.Thread(target\u003d_handler)"},{"line_number":198,"context_line":"        th.start()"},{"line_number":199,"context_line":""},{"line_number":200,"context_line":"    @classmethod"}],"source_content_type":"text/x-python","patch_set":15,"id":"7aa08908_c90b0423","line":197,"in_reply_to":"9abb7d3a_bf8efacd","updated":"2016-06-13 14:32:04.000000000","message":"Good idea, thanks!","commit_id":"52e0492ba7537842b87b921e7b6a12a4a8b6cb11"},{"author":{"_account_id":8688,"name":"Alexis Lee","email":"openstack@lxsli.co.uk","username":"lxsli"},"change_message_id":"699973213eae365e4adc87a9eb329f8b6d329e82","unresolved":false,"context_lines":[{"line_number":166,"context_line":"                                  version, service_name, log_dir)"},{"line_number":167,"context_line":""},{"line_number":168,"context_line":"    @classmethod"},{"line_number":169,"context_line":"    def _setup_file_handler(cls, filepath, interval, version, service_name,"},{"line_number":170,"context_line":"                            log_dir):"},{"line_number":171,"context_line":""},{"line_number":172,"context_line":"        st \u003d os.stat(filepath)"}],"source_content_type":"text/x-python","patch_set":16,"id":"7aa08908_023ddedc","line":169,"range":{"start_line":169,"start_character":8,"end_line":169,"end_character":27},"updated":"2016-06-13 14:56:12.000000000","message":"can we call this a file watcher instead please? Handler is so vague.","commit_id":"bea22e2258417abc281232740df1b59f85b3f092"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"86bbe8d3fc6f968d7d87ecce4e64297550e36d39","unresolved":false,"context_lines":[{"line_number":166,"context_line":"                                  version, service_name, log_dir)"},{"line_number":167,"context_line":""},{"line_number":168,"context_line":"    @classmethod"},{"line_number":169,"context_line":"    def _setup_file_handler(cls, filepath, interval, version, service_name,"},{"line_number":170,"context_line":"                            log_dir):"},{"line_number":171,"context_line":""},{"line_number":172,"context_line":"        st \u003d os.stat(filepath)"}],"source_content_type":"text/x-python","patch_set":16,"id":"7aa08908_c8949738","line":169,"range":{"start_line":169,"start_character":8,"end_line":169,"end_character":27},"in_reply_to":"7aa08908_023ddedc","updated":"2016-06-13 15:24:46.000000000","message":"Done","commit_id":"bea22e2258417abc281232740df1b59f85b3f092"},{"author":{"_account_id":8688,"name":"Alexis Lee","email":"openstack@lxsli.co.uk","username":"lxsli"},"change_message_id":"699973213eae365e4adc87a9eb329f8b6d329e82","unresolved":false,"context_lines":[{"line_number":181,"context_line":"                    stat \u003d os.stat(filepath)"},{"line_number":182,"context_line":"                    if stat.st_mtime \u003e mtime:"},{"line_number":183,"context_line":"                        cls.handle_signal(version, service_name, log_dir, None)"},{"line_number":184,"context_line":"                        mtime \u003d time.time()"},{"line_number":185,"context_line":"                except OSError:"},{"line_number":186,"context_line":"                    msg \u003d (\"Guru Meditation Report cannot read \" +"},{"line_number":187,"context_line":"                           \"\u0027{0}\u0027 file\".format(filepath))"}],"source_content_type":"text/x-python","patch_set":16,"id":"7aa08908_828d4ed5","line":184,"range":{"start_line":184,"start_character":32,"end_line":184,"end_character":43},"updated":"2016-06-13 14:56:12.000000000","message":"we can use stat.st_mtime instead of calling time.time() again. mtime is of the file and we just stat\u0027d it, so lets use the accurate value instead of guessing \"about now\"","commit_id":"bea22e2258417abc281232740df1b59f85b3f092"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"86bbe8d3fc6f968d7d87ecce4e64297550e36d39","unresolved":false,"context_lines":[{"line_number":181,"context_line":"                    stat \u003d os.stat(filepath)"},{"line_number":182,"context_line":"                    if stat.st_mtime \u003e mtime:"},{"line_number":183,"context_line":"                        cls.handle_signal(version, service_name, log_dir, None)"},{"line_number":184,"context_line":"                        mtime \u003d time.time()"},{"line_number":185,"context_line":"                except OSError:"},{"line_number":186,"context_line":"                    msg \u003d (\"Guru Meditation Report cannot read \" +"},{"line_number":187,"context_line":"                           \"\u0027{0}\u0027 file\".format(filepath))"}],"source_content_type":"text/x-python","patch_set":16,"id":"7aa08908_08adff9a","line":184,"range":{"start_line":184,"start_character":32,"end_line":184,"end_character":43},"in_reply_to":"7aa08908_828d4ed5","updated":"2016-06-13 15:24:46.000000000","message":"Now, I\u0027ve understood your idea! Thank you for the help, Alexis","commit_id":"bea22e2258417abc281232740df1b59f85b3f092"}],"oslo_reports/opts.py":[{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"aa99b1fe1d5ad4c42d648077f6b0a33a4c7fc72e","unresolved":false,"context_lines":[{"line_number":28,"context_line":"    cfg.StrOpt(\u0027log_dir\u0027,"},{"line_number":29,"context_line":"               help\u003d_(\u0027Path to a log directory where to create a file\u0027)),"},{"line_number":30,"context_line":"    cfg.StrOpt(\u0027file_event_handler\u0027,"},{"line_number":31,"context_line":"               help\u003d_(\u0027Path to a file modification of which will be \u0027"},{"line_number":32,"context_line":"                      \u0027used instead of signals\u0027)),"},{"line_number":33,"context_line":"    cfg.IntOpt(\u0027file_event_handler_interval\u0027,"},{"line_number":34,"context_line":"               default\u003d60,"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a7b0d38_6041e137","line":31,"updated":"2015-12-28 16:20:56.000000000","message":"Is this saying that the value of the option should be the path to a file to watch for changes to trigger the reports, instead of signals?","commit_id":"a07bf484794bc686f1969e94b4a1fa5df0f552f8"},{"author":{"_account_id":5638,"name":"Davanum Srinivas","email":"davanum@gmail.com","username":"dims-v"},"change_message_id":"374df31428056d04a21ba6eca7dc47299f58f017","unresolved":false,"context_lines":[{"line_number":32,"context_line":"                      \u0027the reports, instead of signals\u0027)),"},{"line_number":33,"context_line":"    cfg.IntOpt(\u0027file_event_handler_interval\u0027,"},{"line_number":34,"context_line":"               default\u003d60,"},{"line_number":35,"context_line":"               help\u003d_(\u0027file_event_handler modifications check interval\u0027))"},{"line_number":36,"context_line":"]"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"da6ed579_6647474c","line":35,"updated":"2016-01-16 01:22:27.000000000","message":"in seconds right?","commit_id":"97f66c615645f91b98064f2a63614123039db69d"},{"author":{"_account_id":9796,"name":"ChangBo Guo","email":"glongwave@gmail.com","username":"gcb"},"change_message_id":"2e222495b4a8d2fcca2e24f0c07ebaa815cc2f90","unresolved":false,"context_lines":[{"line_number":29,"context_line":"               help\u003d_(\u0027Path to a log directory where to create a file\u0027)),"},{"line_number":30,"context_line":"    cfg.StrOpt(\u0027file_event_handler\u0027,"},{"line_number":31,"context_line":"               help\u003d_(\u0027the path to a file to watch for changes to trigger \u0027"},{"line_number":32,"context_line":"                      \u0027the reports, instead of signals\u0027)),"},{"line_number":33,"context_line":"    cfg.IntOpt(\u0027file_event_handler_interval\u0027,"},{"line_number":34,"context_line":"               default\u003d60,"},{"line_number":35,"context_line":"               help\u003d_(\u0027file_event_handler modifications check interval \u0027"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a68dd71_08bedefe","line":32,"range":{"start_line":32,"start_character":54,"end_line":32,"end_character":58},"updated":"2016-01-25 05:58:26.000000000","message":"Add more info like \"this will disable singals way\" ?","commit_id":"0199456409205e7fdc79a8cf30585da63454b747"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"0a52f978e8dcbea97b68bcd1870ab69ce0465c08","unresolved":false,"context_lines":[{"line_number":29,"context_line":"               help\u003d_(\u0027Path to a log directory where to create a file\u0027)),"},{"line_number":30,"context_line":"    cfg.StrOpt(\u0027file_event_handler\u0027,"},{"line_number":31,"context_line":"               help\u003d_(\u0027the path to a file to watch for changes to trigger \u0027"},{"line_number":32,"context_line":"                      \u0027the reports, instead of signals\u0027)),"},{"line_number":33,"context_line":"    cfg.IntOpt(\u0027file_event_handler_interval\u0027,"},{"line_number":34,"context_line":"               default\u003d60,"},{"line_number":35,"context_line":"               help\u003d_(\u0027file_event_handler modifications check interval \u0027"}],"source_content_type":"text/x-python","patch_set":5,"id":"7a5de9d1_3f99c2c4","line":32,"range":{"start_line":32,"start_character":54,"end_line":32,"end_character":58},"in_reply_to":"9a68dd71_08bedefe","updated":"2016-01-29 20:49:06.000000000","message":"Yes, we need to be more explicit that this disables the signal-based trigger. Saying \"instead of\" is a little subtle. Something like \"setting this option disables the signal trigger for the reports\".","commit_id":"0199456409205e7fdc79a8cf30585da63454b747"},{"author":{"_account_id":8688,"name":"Alexis Lee","email":"openstack@lxsli.co.uk","username":"lxsli"},"change_message_id":"0031904cf0c692c55a788b1f472c28cf9ab9b5b1","unresolved":false,"context_lines":[{"line_number":34,"context_line":"                      \u0027application is runnig as WSGI application it is \u0027"},{"line_number":35,"context_line":"                      \u0027recommened to use file trigger instead of signals.\u0027)),"},{"line_number":36,"context_line":"    cfg.IntOpt(\u0027file_event_handler_interval\u0027,"},{"line_number":37,"context_line":"               default\u003d60,"},{"line_number":38,"context_line":"               help\u003d_(\u0027file_event_handler modifications check interval \u0027"},{"line_number":39,"context_line":"                      \u0027in seconds\u0027))"},{"line_number":40,"context_line":"]"}],"source_content_type":"text/x-python","patch_set":10,"id":"bae84128_db4ebdc0","line":37,"updated":"2016-02-19 14:14:55.000000000","message":"This is not very responsive, maybe 5 or 10 is more reasonable? Again I\u0027d rather just use watchdog though... adding this and then switching to watchdog means a deprecation cycle for this option.","commit_id":"dca6bedbe80fbbcee9d90554a2b74ab8eff70216"},{"author":{"_account_id":8688,"name":"Alexis Lee","email":"openstack@lxsli.co.uk","username":"lxsli"},"change_message_id":"8392e634a104178e1e30c245c9798a53dc1b15ac","unresolved":false,"context_lines":[{"line_number":31,"context_line":"               help\u003d_(\u0027The path to a file to watch for changes to trigger \u0027"},{"line_number":32,"context_line":"                      \u0027the reports, instead of signals. Setting this option \u0027"},{"line_number":33,"context_line":"                      \u0027disables the signal trigger for the reports. If \u0027"},{"line_number":34,"context_line":"                      \u0027application is runnig as WSGI application it is \u0027"},{"line_number":35,"context_line":"                      \u0027recommened to use file trigger instead of signals.\u0027)),"},{"line_number":36,"context_line":"    cfg.IntOpt(\u0027file_event_handler_interval\u0027,"},{"line_number":37,"context_line":"               default\u003d10,"}],"source_content_type":"text/x-python","patch_set":14,"id":"9abb7d3a_fb2a8d2e","line":34,"range":{"start_line":34,"start_character":38,"end_line":34,"end_character":52},"updated":"2016-06-02 13:58:33.000000000","message":"nit running as a WSGI","commit_id":"60b346718f54f5956d3d7fb640dc954005ac6dd9"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"e66186720728a4187f0391448588887adb9a0f30","unresolved":false,"context_lines":[{"line_number":31,"context_line":"               help\u003d_(\u0027The path to a file to watch for changes to trigger \u0027"},{"line_number":32,"context_line":"                      \u0027the reports, instead of signals. Setting this option \u0027"},{"line_number":33,"context_line":"                      \u0027disables the signal trigger for the reports. If \u0027"},{"line_number":34,"context_line":"                      \u0027application is runnig as WSGI application it is \u0027"},{"line_number":35,"context_line":"                      \u0027recommened to use file trigger instead of signals.\u0027)),"},{"line_number":36,"context_line":"    cfg.IntOpt(\u0027file_event_handler_interval\u0027,"},{"line_number":37,"context_line":"               default\u003d10,"}],"source_content_type":"text/x-python","patch_set":14,"id":"9abb7d3a_97f503cd","line":34,"range":{"start_line":34,"start_character":38,"end_line":34,"end_character":52},"in_reply_to":"9abb7d3a_fb2a8d2e","updated":"2016-06-02 18:53:27.000000000","message":"Done","commit_id":"60b346718f54f5956d3d7fb640dc954005ac6dd9"},{"author":{"_account_id":8688,"name":"Alexis Lee","email":"openstack@lxsli.co.uk","username":"lxsli"},"change_message_id":"8392e634a104178e1e30c245c9798a53dc1b15ac","unresolved":false,"context_lines":[{"line_number":32,"context_line":"                      \u0027the reports, instead of signals. Setting this option \u0027"},{"line_number":33,"context_line":"                      \u0027disables the signal trigger for the reports. If \u0027"},{"line_number":34,"context_line":"                      \u0027application is runnig as WSGI application it is \u0027"},{"line_number":35,"context_line":"                      \u0027recommened to use file trigger instead of signals.\u0027)),"},{"line_number":36,"context_line":"    cfg.IntOpt(\u0027file_event_handler_interval\u0027,"},{"line_number":37,"context_line":"               default\u003d10,"},{"line_number":38,"context_line":"               help\u003d_(\u0027file_event_handler modifications check interval \u0027"}],"source_content_type":"text/x-python","patch_set":14,"id":"9abb7d3a_fb03adbc","line":35,"range":{"start_line":35,"start_character":23,"end_line":35,"end_character":33},"updated":"2016-06-02 13:58:33.000000000","message":"nit recommended","commit_id":"60b346718f54f5956d3d7fb640dc954005ac6dd9"},{"author":{"_account_id":8688,"name":"Alexis Lee","email":"openstack@lxsli.co.uk","username":"lxsli"},"change_message_id":"8392e634a104178e1e30c245c9798a53dc1b15ac","unresolved":false,"context_lines":[{"line_number":32,"context_line":"                      \u0027the reports, instead of signals. Setting this option \u0027"},{"line_number":33,"context_line":"                      \u0027disables the signal trigger for the reports. If \u0027"},{"line_number":34,"context_line":"                      \u0027application is runnig as WSGI application it is \u0027"},{"line_number":35,"context_line":"                      \u0027recommened to use file trigger instead of signals.\u0027)),"},{"line_number":36,"context_line":"    cfg.IntOpt(\u0027file_event_handler_interval\u0027,"},{"line_number":37,"context_line":"               default\u003d10,"},{"line_number":38,"context_line":"               help\u003d_(\u0027file_event_handler modifications check interval \u0027"}],"source_content_type":"text/x-python","patch_set":14,"id":"9abb7d3a_5bf599c9","line":35,"range":{"start_line":35,"start_character":41,"end_line":35,"end_character":53},"updated":"2016-06-02 13:58:33.000000000","message":"s/file trigger/this/","commit_id":"60b346718f54f5956d3d7fb640dc954005ac6dd9"},{"author":{"_account_id":8688,"name":"Alexis Lee","email":"openstack@lxsli.co.uk","username":"lxsli"},"change_message_id":"8392e634a104178e1e30c245c9798a53dc1b15ac","unresolved":false,"context_lines":[{"line_number":35,"context_line":"                      \u0027recommened to use file trigger instead of signals.\u0027)),"},{"line_number":36,"context_line":"    cfg.IntOpt(\u0027file_event_handler_interval\u0027,"},{"line_number":37,"context_line":"               default\u003d10,"},{"line_number":38,"context_line":"               help\u003d_(\u0027file_event_handler modifications check interval \u0027"},{"line_number":39,"context_line":"                      \u0027in seconds\u0027))"},{"line_number":40,"context_line":"]"},{"line_number":41,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"9abb7d3a_1bb831e5","line":38,"range":{"start_line":38,"start_character":23,"end_line":38,"end_character":41},"updated":"2016-06-02 13:58:33.000000000","message":"\"How many seconds to wait between polls when file_event_handler is set\"","commit_id":"60b346718f54f5956d3d7fb640dc954005ac6dd9"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"e66186720728a4187f0391448588887adb9a0f30","unresolved":false,"context_lines":[{"line_number":35,"context_line":"                      \u0027recommened to use file trigger instead of signals.\u0027)),"},{"line_number":36,"context_line":"    cfg.IntOpt(\u0027file_event_handler_interval\u0027,"},{"line_number":37,"context_line":"               default\u003d10,"},{"line_number":38,"context_line":"               help\u003d_(\u0027file_event_handler modifications check interval \u0027"},{"line_number":39,"context_line":"                      \u0027in seconds\u0027))"},{"line_number":40,"context_line":"]"},{"line_number":41,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"9abb7d3a_57e1dbfd","line":38,"range":{"start_line":38,"start_character":23,"end_line":38,"end_character":41},"in_reply_to":"9abb7d3a_1bb831e5","updated":"2016-06-02 18:53:27.000000000","message":"Done, thanks","commit_id":"60b346718f54f5956d3d7fb640dc954005ac6dd9"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"0fcdd73b0c2bbe22f28fefb917e0ea06df8f53ab","unresolved":false,"context_lines":[{"line_number":27,"context_line":"_options \u003d ["},{"line_number":28,"context_line":"    cfg.StrOpt(\u0027log_dir\u0027,"},{"line_number":29,"context_line":"               help\u003d_(\u0027Path to a log directory where to create a file\u0027)),"},{"line_number":30,"context_line":"    cfg.StrOpt(\u0027file_event_handler\u0027,"},{"line_number":31,"context_line":"               help\u003d_(\u0027The path to a file to watch for changes to trigger \u0027"},{"line_number":32,"context_line":"                      \u0027the reports, instead of signals. Setting this option \u0027"},{"line_number":33,"context_line":"                      \u0027disables the signal trigger for the reports. If \u0027"}],"source_content_type":"text/x-python","patch_set":15,"id":"9abb7d3a_9a54e454","line":30,"updated":"2016-06-03 10:15:21.000000000","message":"(opinion) nit: can we maybe think of a better name here? e.g. touch-trigger or something similar","commit_id":"52e0492ba7537842b87b921e7b6a12a4a8b6cb11"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"0fcdd73b0c2bbe22f28fefb917e0ea06df8f53ab","unresolved":false,"context_lines":[{"line_number":31,"context_line":"               help\u003d_(\u0027The path to a file to watch for changes to trigger \u0027"},{"line_number":32,"context_line":"                      \u0027the reports, instead of signals. Setting this option \u0027"},{"line_number":33,"context_line":"                      \u0027disables the signal trigger for the reports. If \u0027"},{"line_number":34,"context_line":"                      \u0027application is runnig as a WSGI application it is \u0027"},{"line_number":35,"context_line":"                      \u0027recommended to use this instead of signals.\u0027)),"},{"line_number":36,"context_line":"    cfg.IntOpt(\u0027file_event_handler_interval\u0027,"},{"line_number":37,"context_line":"               default\u003d10,"}],"source_content_type":"text/x-python","patch_set":15,"id":"9abb7d3a_5ab0bcdd","line":34,"updated":"2016-06-03 10:15:21.000000000","message":"typo: running","commit_id":"52e0492ba7537842b87b921e7b6a12a4a8b6cb11"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"ee0f49ec502c62fc989342d4ab069a264e5df3ac","unresolved":false,"context_lines":[{"line_number":31,"context_line":"               help\u003d_(\u0027The path to a file to watch for changes to trigger \u0027"},{"line_number":32,"context_line":"                      \u0027the reports, instead of signals. Setting this option \u0027"},{"line_number":33,"context_line":"                      \u0027disables the signal trigger for the reports. If \u0027"},{"line_number":34,"context_line":"                      \u0027application is runnig as a WSGI application it is \u0027"},{"line_number":35,"context_line":"                      \u0027recommended to use this instead of signals.\u0027)),"},{"line_number":36,"context_line":"    cfg.IntOpt(\u0027file_event_handler_interval\u0027,"},{"line_number":37,"context_line":"               default\u003d10,"}],"source_content_type":"text/x-python","patch_set":15,"id":"7aa08908_a9831855","line":34,"in_reply_to":"9abb7d3a_5ab0bcdd","updated":"2016-06-13 14:32:04.000000000","message":"Done","commit_id":"52e0492ba7537842b87b921e7b6a12a4a8b6cb11"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"0fcdd73b0c2bbe22f28fefb917e0ea06df8f53ab","unresolved":false,"context_lines":[{"line_number":34,"context_line":"                      \u0027application is runnig as a WSGI application it is \u0027"},{"line_number":35,"context_line":"                      \u0027recommended to use this instead of signals.\u0027)),"},{"line_number":36,"context_line":"    cfg.IntOpt(\u0027file_event_handler_interval\u0027,"},{"line_number":37,"context_line":"               default\u003d10,"},{"line_number":38,"context_line":"               help\u003d_(\u0027How many seconds to wait between polls when \u0027"},{"line_number":39,"context_line":"                      \u0027file_event_handler is set\u0027))"},{"line_number":40,"context_line":"]"}],"source_content_type":"text/x-python","patch_set":15,"id":"9abb7d3a_3aea18ad","line":37,"updated":"2016-06-03 10:15:21.000000000","message":"I think it\u0027s too long. Maybe use 1 second?","commit_id":"52e0492ba7537842b87b921e7b6a12a4a8b6cb11"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"ee0f49ec502c62fc989342d4ab069a264e5df3ac","unresolved":false,"context_lines":[{"line_number":34,"context_line":"                      \u0027application is runnig as a WSGI application it is \u0027"},{"line_number":35,"context_line":"                      \u0027recommended to use this instead of signals.\u0027)),"},{"line_number":36,"context_line":"    cfg.IntOpt(\u0027file_event_handler_interval\u0027,"},{"line_number":37,"context_line":"               default\u003d10,"},{"line_number":38,"context_line":"               help\u003d_(\u0027How many seconds to wait between polls when \u0027"},{"line_number":39,"context_line":"                      \u0027file_event_handler is set\u0027))"},{"line_number":40,"context_line":"]"}],"source_content_type":"text/x-python","patch_set":15,"id":"7aa08908_e979a083","line":37,"in_reply_to":"9abb7d3a_3aea18ad","updated":"2016-06-13 14:32:04.000000000","message":"Done","commit_id":"52e0492ba7537842b87b921e7b6a12a4a8b6cb11"}],"oslo_reports/tests/test_guru_meditation_report.py":[{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"aa99b1fe1d5ad4c42d648077f6b0a33a4c7fc72e","unresolved":false,"context_lines":[{"line_number":169,"context_line":"        self.assertIn(\u0027Guru Meditation\u0027, sys.stderr.getvalue())"},{"line_number":170,"context_line":""},{"line_number":171,"context_line":"    @mock.patch.object(gmr.TextGuruMeditation, \u0027_setup_file_handler\u0027)"},{"line_number":172,"context_line":"    def test_register_autorun_without_signals(self, mock_setup_fh):"},{"line_number":173,"context_line":"        fake_conf \u003d mock.Mock()"},{"line_number":174,"context_line":"        fake_conf.file_signal \u003d \u0027/tmp/file\u0027"},{"line_number":175,"context_line":"        fake_conf.file_signal_interval \u003d 10"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a7b0d38_20baf90a","line":172,"updated":"2015-12-28 16:20:56.000000000","message":"Please add a test case showing that the report is triggered only one time when the file is modified and is not generated again after the file_signal_interval period elapses (see my other comment about the check loop).","commit_id":"a07bf484794bc686f1969e94b4a1fa5df0f552f8"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"aa99b1fe1d5ad4c42d648077f6b0a33a4c7fc72e","unresolved":false,"context_lines":[{"line_number":173,"context_line":"        fake_conf \u003d mock.Mock()"},{"line_number":174,"context_line":"        fake_conf.file_signal \u003d \u0027/tmp/file\u0027"},{"line_number":175,"context_line":"        fake_conf.file_signal_interval \u003d 10"},{"line_number":176,"context_line":"        fake_conf.oslo_reports.log_dir \u003d \u0027/var/fake_log\u0027"},{"line_number":177,"context_line":"        version \u003d FakeVersionObj()"},{"line_number":178,"context_line":"        gmr.TextGuruMeditation.setup_autorun(version, conf\u003dfake_conf)"},{"line_number":179,"context_line":"        mock_setup_fh.assert_called_once_with("}],"source_content_type":"text/x-python","patch_set":3,"id":"1a7b0d38_e00cf1ee","line":176,"updated":"2015-12-28 16:20:56.000000000","message":"Please use the fixture from oslo.config to set up a proper configuration object and register the options for this library in the usual way. Notice that you\u0027ve had to set log_dir under oslo_reports but did not set the other options there, so the code accessing the options is looking in the wrong place and won\u0027t actually work at runtime.","commit_id":"a07bf484794bc686f1969e94b4a1fa5df0f552f8"},{"author":{"_account_id":8688,"name":"Alexis Lee","email":"openstack@lxsli.co.uk","username":"lxsli"},"change_message_id":"8392e634a104178e1e30c245c9798a53dc1b15ac","unresolved":false,"context_lines":[{"line_number":20,"context_line":"import signal"},{"line_number":21,"context_line":"import sys"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"# needed to get greenthreads"},{"line_number":24,"context_line":"import fixtures"},{"line_number":25,"context_line":"import greenlet"},{"line_number":26,"context_line":"import mock"}],"source_content_type":"text/x-python","patch_set":14,"id":"9abb7d3a_bb75a533","side":"PARENT","line":23,"updated":"2016-06-02 13:58:33.000000000","message":"why remove this?","commit_id":"71ce8f5f30bef41278e1ea9be94932ade8aac313"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"e66186720728a4187f0391448588887adb9a0f30","unresolved":false,"context_lines":[{"line_number":20,"context_line":"import signal"},{"line_number":21,"context_line":"import sys"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"# needed to get greenthreads"},{"line_number":24,"context_line":"import fixtures"},{"line_number":25,"context_line":"import greenlet"},{"line_number":26,"context_line":"import mock"}],"source_content_type":"text/x-python","patch_set":14,"id":"9abb7d3a_37b9b7ed","side":"PARENT","line":23,"in_reply_to":"9abb7d3a_bb75a533","updated":"2016-06-02 18:53:27.000000000","message":"Looks like a rebase issues","commit_id":"71ce8f5f30bef41278e1ea9be94932ade8aac313"}]}
