)]}'
{"swift/common/daemon.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"755c46d6f78de5f5f34cce6c0d2936274e2067d6","unresolved":false,"context_lines":[{"line_number":267,"context_line":"        # and results in an exit code of 1."},{"line_number":268,"context_line":"        sys.exit(e)"},{"line_number":269,"context_line":""},{"line_number":270,"context_line":"    use_hub(utils.get_hub())"},{"line_number":271,"context_line":""},{"line_number":272,"context_line":"    # once on command line (i.e. daemonize\u003dfalse) will over-ride config"},{"line_number":273,"context_line":"    once \u003d once or not utils.config_true_value(conf.get(\u0027daemonize\u0027, \u0027true\u0027))"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f4e5783_26ebd079","line":270,"updated":"2017-10-12 19:17:42.000000000","message":"+2","commit_id":"dc8da5bb194d0a544fb8065aa9a4c7484f605715"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"af12e40f654161dd9787ef4210759688021d4270","unresolved":false,"context_lines":[{"line_number":267,"context_line":"        # and results in an exit code of 1."},{"line_number":268,"context_line":"        sys.exit(e)"},{"line_number":269,"context_line":""},{"line_number":270,"context_line":"    use_hub(utils.get_hub())"},{"line_number":271,"context_line":""},{"line_number":272,"context_line":"    # once on command line (i.e. daemonize\u003dfalse) will over-ride config"},{"line_number":273,"context_line":"    once \u003d once or not utils.config_true_value(conf.get(\u0027daemonize\u0027, \u0027true\u0027))"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f4e5783_c68b891c","line":270,"in_reply_to":"5f4e5783_26ebd079","updated":"2017-10-16 18:36:23.000000000","message":"I\u0027m starting to wonder whether utils.get_hub ought to be utils.set_hub...","commit_id":"dc8da5bb194d0a544fb8065aa9a4c7484f605715"}],"swift/common/utils.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"af12e40f654161dd9787ef4210759688021d4270","unresolved":false,"context_lines":[{"line_number":1970,"context_line":"def get_hub():"},{"line_number":1971,"context_line":"    \"\"\""},{"line_number":1972,"context_line":"    Checks whether poll is available and falls back"},{"line_number":1973,"context_line":"    on select if it isn\u0027t."},{"line_number":1974,"context_line":""},{"line_number":1975,"context_line":"    Note about epoll:"},{"line_number":1976,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"5f4e5783_a6c2cd57","line":1973,"updated":"2017-10-16 18:36:23.000000000","message":"Hmm... This isn\u0027t strictly true... We may still fall back to whatever eventlet wants to use, if `import select` raises an ImportError","commit_id":"dc8da5bb194d0a544fb8065aa9a4c7484f605715"},{"author":{"_account_id":17363,"name":"Timur Alperovich","email":"timur@timuralp.com","username":"timuralp"},"change_message_id":"d7674dc86fec0b24753826f5c3213aa35700323d","unresolved":false,"context_lines":[{"line_number":1983,"context_line":"    was re-used, eventlet would freak right out because it still"},{"line_number":1984,"context_line":"    thought it was waiting for activity from it in some other coro."},{"line_number":1985,"context_line":""},{"line_number":1986,"context_line":"    Another note about epoll: it\u0027s hard to use when forking. epoll works"},{"line_number":1987,"context_line":"    like so:"},{"line_number":1988,"context_line":""},{"line_number":1989,"context_line":"       * create an epoll instance: efd \u003d epoll_create(...)"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f4e5783_50468151","line":1986,"updated":"2017-10-12 20:58:10.000000000","message":"+1 Thanks for documenting this!","commit_id":"dc8da5bb194d0a544fb8065aa9a4c7484f605715"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"af12e40f654161dd9787ef4210759688021d4270","unresolved":false,"context_lines":[{"line_number":2000,"context_line":"    even try to do those things since it doesn\u0027t get notified of forks."},{"line_number":2001,"context_line":""},{"line_number":2002,"context_line":"    In contrast, both poll() and select() specify the set of interesting"},{"line_number":2003,"context_line":"    file descriptors with each call, so there\u0027s no problem with forking."},{"line_number":2004,"context_line":"    \"\"\""},{"line_number":2005,"context_line":"    try:"},{"line_number":2006,"context_line":"        import select"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f4e5783_86da3148","line":2003,"updated":"2017-10-16 18:36:23.000000000","message":"Off-topic: out of curiosity, why do we prefer poll over selects?","commit_id":"dc8da5bb194d0a544fb8065aa9a4c7484f605715"}],"swift/obj/reconstructor.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"af12e40f654161dd9787ef4210759688021d4270","unresolved":false,"context_lines":[{"line_number":51,"context_line":"SYNC, REVERT \u003d (\u0027sync_only\u0027, \u0027sync_revert\u0027)"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"hubs.use_hub(get_hub())"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"def _get_partners(frag_index, part_nodes):"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f4e5783_2967f7bf","side":"PARENT","line":54,"updated":"2017-10-16 18:36:23.000000000","message":"Sweet! Fewer import side effects.","commit_id":"b70436f91c05c127107fc8570d16eb08ba322768"}],"swift/obj/replicator.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"af12e40f654161dd9787ef4210759688021d4270","unresolved":false,"context_lines":[{"line_number":43,"context_line":""},{"line_number":44,"context_line":"DEFAULT_RSYNC_TIMEOUT \u003d 900"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"hubs.use_hub(get_hub())"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"def _do_listdir(partition, replication_cycle):"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f4e5783_0958bbf7","side":"PARENT","line":46,"updated":"2017-10-16 18:36:23.000000000","message":"And here :-)","commit_id":"b70436f91c05c127107fc8570d16eb08ba322768"}],"test/unit/common/test_daemon.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"755c46d6f78de5f5f34cce6c0d2936274e2067d6","unresolved":false,"context_lines":[{"line_number":142,"context_line":"        with tmpfile(sample_conf) as conf_file, \\"},{"line_number":143,"context_line":"                mock.patch(\u0027swift.common.daemon.use_hub\u0027) as mock_use_hub:"},{"line_number":144,"context_line":"            with mock.patch.dict(\u0027os.environ\u0027, {\u0027TZ\u0027: \u0027\u0027}), \\"},{"line_number":145,"context_line":"                    mock.patch(\u0027time.tzset\u0027) as mock_tzset:"},{"line_number":146,"context_line":"                daemon.run_daemon(MyDaemon, conf_file)"},{"line_number":147,"context_line":"                self.assertTrue(MyDaemon.forever_called)"},{"line_number":148,"context_line":"                self.assertEqual(os.environ[\u0027TZ\u0027], \u0027UTC+0\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f4e5783_46c24ceb","line":145,"updated":"2017-10-12 19:17:42.000000000","message":"just FYI you can collapse the named with statement too\n\nhttps://docs.python.org/2/reference/compound_stmts.html#the-with-statement","commit_id":"dc8da5bb194d0a544fb8065aa9a4c7484f605715"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"755c46d6f78de5f5f34cce6c0d2936274e2067d6","unresolved":false,"context_lines":[{"line_number":186,"context_line":""},{"line_number":187,"context_line":"            sample_conf \u003d \"[my-daemon]\\nuser \u003d %s\\n\" % getuser()"},{"line_number":188,"context_line":"            with tmpfile(sample_conf) as conf_file, \\"},{"line_number":189,"context_line":"                    mock.patch(\u0027swift.common.daemon.use_hub\u0027):"},{"line_number":190,"context_line":"                daemon.run_daemon(MyDaemon, conf_file)"},{"line_number":191,"context_line":"                self.assertFalse(MyDaemon.once_called)"},{"line_number":192,"context_line":"                self.assertTrue(MyDaemon.forever_called)"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f4e5783_e6b25894","line":189,"updated":"2017-10-12 19:17:42.000000000","message":"oh.. you knew that...","commit_id":"dc8da5bb194d0a544fb8065aa9a4c7484f605715"}]}
