)]}'
{"futurist/periodics.py":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"5e4842d0b27cba872ad1c6ff1f88569e996c2187","unresolved":false,"context_lines":[{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    :param run_immediately: option to specify whether to run"},{"line_number":45,"context_line":"                            immediately or not"},{"line_number":46,"context_line":"    :type run_immediately: boolean"},{"line_number":47,"context_line":"    \"\"\""},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"    if spacing \u003c\u003d 0:"}],"source_content_type":"text/x-python","patch_set":3,"id":"3afb71cf_e23bffcf","line":46,"updated":"2015-06-08 07:32:51.000000000","message":":param spacing: required","commit_id":"36b1c17a36c1a684b255c8799aae1edb951cccd0"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"99463239dd70823993c71290384b22560ad1621a","unresolved":false,"context_lines":[{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    :param run_immediately: option to specify whether to run"},{"line_number":45,"context_line":"                            immediately or not"},{"line_number":46,"context_line":"    :type run_immediately: boolean"},{"line_number":47,"context_line":"    \"\"\""},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"    if spacing \u003c\u003d 0:"}],"source_content_type":"text/x-python","patch_set":3,"id":"3afb71cf_907d95e9","line":46,"in_reply_to":"3afb71cf_e23bffcf","updated":"2015-06-08 19:19:03.000000000","message":"Done","commit_id":"36b1c17a36c1a684b255c8799aae1edb951cccd0"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"5e4842d0b27cba872ad1c6ff1f88569e996c2187","unresolved":false,"context_lines":[{"line_number":106,"context_line":"    try:"},{"line_number":107,"context_line":"        cb()"},{"line_number":108,"context_line":"    except Exception:"},{"line_number":109,"context_line":"        log.warn(\"Failed to call %s \u0027%r\u0027\", kind, cb, exc_info\u003dTrue)"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"class PeriodicWorker(object):"}],"source_content_type":"text/x-python","patch_set":3,"id":"3afb71cf_c236c3e6","line":109,"updated":"2015-06-08 07:32:51.000000000","message":"I would say it\u0027s log.exception, not warning.. I don\u0027t think periodic tasks should normally raise unhandled exceptions","commit_id":"36b1c17a36c1a684b255c8799aae1edb951cccd0"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"5e4842d0b27cba872ad1c6ff1f88569e996c2187","unresolved":false,"context_lines":[{"line_number":124,"context_line":""},{"line_number":125,"context_line":"        Only picks up methods that have been tagged/decorated with"},{"line_number":126,"context_line":"        the :py:func:`.periodic` decorator (does not match against private"},{"line_number":127,"context_line":"        or protected methods unless explicitly requested to)."},{"line_number":128,"context_line":"        \"\"\""},{"line_number":129,"context_line":"        callables \u003d []"},{"line_number":130,"context_line":"        for obj in objects:"}],"source_content_type":"text/x-python","patch_set":3,"id":"3afb71cf_a23507db","line":127,"updated":"2015-06-08 07:32:51.000000000","message":"please document arguments","commit_id":"36b1c17a36c1a684b255c8799aae1edb951cccd0"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"5e4842d0b27cba872ad1c6ff1f88569e996c2187","unresolved":false,"context_lines":[{"line_number":137,"context_line":"                        callables.append(member)"},{"line_number":138,"context_line":"        return cls(callables, log\u003dlog)"},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"    def __init__(self, callables, log\u003dNone):"},{"line_number":141,"context_line":"        self._tombstone \u003d threading.Event()"},{"line_number":142,"context_line":"        self._callables \u003d []"},{"line_number":143,"context_line":"        for i, cb in enumerate(callables, 1):"}],"source_content_type":"text/x-python","patch_set":3,"id":"3afb71cf_8230cbe9","line":140,"updated":"2015-06-08 07:32:51.000000000","message":"maybe add *args, **kwargs (or at least *args) that will be passed to every callable?","commit_id":"36b1c17a36c1a684b255c8799aae1edb951cccd0"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"b022283174ce1bcac47427ab7b30277d1a32b743","unresolved":false,"context_lines":[{"line_number":137,"context_line":"                        callables.append(member)"},{"line_number":138,"context_line":"        return cls(callables, log\u003dlog)"},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"    def __init__(self, callables, log\u003dNone):"},{"line_number":141,"context_line":"        self._tombstone \u003d threading.Event()"},{"line_number":142,"context_line":"        self._callables \u003d []"},{"line_number":143,"context_line":"        for i, cb in enumerate(callables, 1):"}],"source_content_type":"text/x-python","patch_set":3,"id":"3afb71cf_33add631","line":140,"in_reply_to":"3afb71cf_8230cbe9","updated":"2015-06-08 15:42:39.000000000","message":"Hmmm, could be done.","commit_id":"36b1c17a36c1a684b255c8799aae1edb951cccd0"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"5e4842d0b27cba872ad1c6ff1f88569e996c2187","unresolved":false,"context_lines":[{"line_number":164,"context_line":"        \"\"\""},{"line_number":165,"context_line":"        if not self._callables:"},{"line_number":166,"context_line":"            raise RuntimeError(\"A periodic worker can not start\""},{"line_number":167,"context_line":"                               \" without any callables\")"},{"line_number":168,"context_line":"        while not self._tombstone.is_set():"},{"line_number":169,"context_line":"            if self._immediates:"},{"line_number":170,"context_line":"                # Run \u0026 schedule its next execution."}],"source_content_type":"text/x-python","patch_set":3,"id":"3afb71cf_624eef70","line":167,"updated":"2015-06-08 07:32:51.000000000","message":"will it be possible in the future to add callables in run time?","commit_id":"36b1c17a36c1a684b255c8799aae1edb951cccd0"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"b022283174ce1bcac47427ab7b30277d1a32b743","unresolved":false,"context_lines":[{"line_number":164,"context_line":"        \"\"\""},{"line_number":165,"context_line":"        if not self._callables:"},{"line_number":166,"context_line":"            raise RuntimeError(\"A periodic worker can not start\""},{"line_number":167,"context_line":"                               \" without any callables\")"},{"line_number":168,"context_line":"        while not self._tombstone.is_set():"},{"line_number":169,"context_line":"            if self._immediates:"},{"line_number":170,"context_line":"                # Run \u0026 schedule its next execution."}],"source_content_type":"text/x-python","patch_set":3,"id":"3afb71cf_b34e6694","line":167,"in_reply_to":"3afb71cf_624eef70","updated":"2015-06-08 15:42:39.000000000","message":"Possibly ;)","commit_id":"36b1c17a36c1a684b255c8799aae1edb951cccd0"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"0fc8d916a2d2367fc8a485df469374837acb4035","unresolved":false,"context_lines":[{"line_number":119,"context_line":"    except Exception:"},{"line_number":120,"context_line":"        how_often \u003d cb._periodic_spacing"},{"line_number":121,"context_line":"        log.exception(\"Failed to call %s \u0027%r\u0027 (it runs every %0.2f\""},{"line_number":122,"context_line":"                      \" seconds)\", kind, cb, how_often)"},{"line_number":123,"context_line":""},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"class PeriodicWorker(object):"}],"source_content_type":"text/x-python","patch_set":4,"id":"3afb71cf_d1073680","line":122,"updated":"2015-06-10 12:26:03.000000000","message":"nit: maybe it\u0027s better to use dict substitution (like %(kind)s) for readability","commit_id":"e1df7b47275a6e36f4df63960cefed43d615f681"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"2b3e8188b87452272ac22dc9fcec50141646b740","unresolved":false,"context_lines":[{"line_number":119,"context_line":"    except Exception:"},{"line_number":120,"context_line":"        how_often \u003d cb._periodic_spacing"},{"line_number":121,"context_line":"        log.exception(\"Failed to call %s \u0027%r\u0027 (it runs every %0.2f\""},{"line_number":122,"context_line":"                      \" seconds)\", kind, cb, how_often)"},{"line_number":123,"context_line":""},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"class PeriodicWorker(object):"}],"source_content_type":"text/x-python","patch_set":4,"id":"3afb71cf_78085428","line":122,"in_reply_to":"3afb71cf_d1073680","updated":"2015-06-10 18:13:28.000000000","message":"Meh, I hope all programmers can figure out both :-P","commit_id":"e1df7b47275a6e36f4df63960cefed43d615f681"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"0fc8d916a2d2367fc8a485df469374837acb4035","unresolved":false,"context_lines":[{"line_number":157,"context_line":"            for (name, member) in inspect.getmembers(obj):"},{"line_number":158,"context_line":"                if name.startswith(\"_\") and exclude_hidden:"},{"line_number":159,"context_line":"                    continue"},{"line_number":160,"context_line":"                if six.callable(member):"},{"line_number":161,"context_line":"                    missing_attrs \u003d _check_attrs(member)"},{"line_number":162,"context_line":"                    if not missing_attrs:"},{"line_number":163,"context_line":"                        # These do not support custom args, kwargs..."}],"source_content_type":"text/x-python","patch_set":4,"id":"3afb71cf_b10a7a88","line":160,"updated":"2015-06-10 12:26:03.000000000","message":"nit: wasn\u0027t callable function restored in Python 3? I believe six.callable is only needed for non-supported Python 3 versions","commit_id":"e1df7b47275a6e36f4df63960cefed43d615f681"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"0fc8d916a2d2367fc8a485df469374837acb4035","unresolved":false,"context_lines":[{"line_number":182,"context_line":"        :param log: logger to use when creating a new worker (defaults"},{"line_number":183,"context_line":"                    to the module logger if none provided), it is currently"},{"line_number":184,"context_line":"                    only used to report callback failures (if they occur)"},{"line_number":185,"context_line":"        :type log: logger"},{"line_number":186,"context_line":"        \"\"\""},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"        self._tombstone \u003d threading.Event()"}],"source_content_type":"text/x-python","patch_set":4,"id":"3afb71cf_91fd3e70","line":185,"updated":"2015-06-10 12:26:03.000000000","message":"out of curiosity: why do you need logger to be passed here? python logging system is already pluggable","commit_id":"e1df7b47275a6e36f4df63960cefed43d615f681"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"2b3e8188b87452272ac22dc9fcec50141646b740","unresolved":false,"context_lines":[{"line_number":182,"context_line":"        :param log: logger to use when creating a new worker (defaults"},{"line_number":183,"context_line":"                    to the module logger if none provided), it is currently"},{"line_number":184,"context_line":"                    only used to report callback failures (if they occur)"},{"line_number":185,"context_line":"        :type log: logger"},{"line_number":186,"context_line":"        \"\"\""},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"        self._tombstone \u003d threading.Event()"}],"source_content_type":"text/x-python","patch_set":4,"id":"3afb71cf_582238a4","line":185,"in_reply_to":"3afb71cf_91fd3e70","updated":"2015-06-10 18:13:28.000000000","message":"So the idea is that if u have multiple periodic workers (not just one); u may want to have each worker use different logger objects to write failures to, using the module level one means they all go to the same place. If u think its *not* useful I can remove it.","commit_id":"e1df7b47275a6e36f4df63960cefed43d615f681"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"0fc8d916a2d2367fc8a485df469374837acb4035","unresolved":false,"context_lines":[{"line_number":188,"context_line":"        self._tombstone \u003d threading.Event()"},{"line_number":189,"context_line":"        self._callables \u003d []"},{"line_number":190,"context_line":"        for i, (cb, args, kwargs) in enumerate(callables, 1):"},{"line_number":191,"context_line":"            if not six.callable(cb):"},{"line_number":192,"context_line":"                raise ValueError(\"Periodic callback %s must be callable\" % i)"},{"line_number":193,"context_line":"            missing_attrs \u003d _check_attrs(cb)"},{"line_number":194,"context_line":"            if missing_attrs:"}],"source_content_type":"text/x-python","patch_set":4,"id":"3afb71cf_71008266","line":191,"updated":"2015-06-10 12:26:03.000000000","message":"ditto about callable","commit_id":"e1df7b47275a6e36f4df63960cefed43d615f681"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"0fc8d916a2d2367fc8a485df469374837acb4035","unresolved":false,"context_lines":[{"line_number":193,"context_line":"            missing_attrs \u003d _check_attrs(cb)"},{"line_number":194,"context_line":"            if missing_attrs:"},{"line_number":195,"context_line":"                raise ValueError(\"Periodic callback %s missing required\""},{"line_number":196,"context_line":"                                 \" attributes %s\" % (i, missing_attrs))"},{"line_number":197,"context_line":"            if cb._periodic:"},{"line_number":198,"context_line":"                # Ensure these aren\u0027t none and if so replace them with"},{"line_number":199,"context_line":"                # something more appropriate..."}],"source_content_type":"text/x-python","patch_set":4,"id":"3afb71cf_51fc666f","line":196,"updated":"2015-06-10 12:26:03.000000000","message":"maybe it\u0027s better to report \u0027cb\u0027, not \u0027i\u0027 (or even both)?","commit_id":"e1df7b47275a6e36f4df63960cefed43d615f681"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"2b3e8188b87452272ac22dc9fcec50141646b740","unresolved":false,"context_lines":[{"line_number":193,"context_line":"            missing_attrs \u003d _check_attrs(cb)"},{"line_number":194,"context_line":"            if missing_attrs:"},{"line_number":195,"context_line":"                raise ValueError(\"Periodic callback %s missing required\""},{"line_number":196,"context_line":"                                 \" attributes %s\" % (i, missing_attrs))"},{"line_number":197,"context_line":"            if cb._periodic:"},{"line_number":198,"context_line":"                # Ensure these aren\u0027t none and if so replace them with"},{"line_number":199,"context_line":"                # something more appropriate..."}],"source_content_type":"text/x-python","patch_set":4,"id":"3afb71cf_183960d7","line":196,"in_reply_to":"3afb71cf_51fc666f","updated":"2015-06-10 18:13:28.000000000","message":"Sure.","commit_id":"e1df7b47275a6e36f4df63960cefed43d615f681"}]}
