)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":18683,"name":"Eva Balycheva","email":"ubershy@gmail.com","username":"eva"},"change_message_id":"8a27403407146d62b103f90a5af7cddd34d6fefd","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Currently, the TTL of subscriptons doesn\u0027t work. That said, after"},{"line_number":10,"context_line":"the ttl seconds, the subscription can\u0027t be deleted. This pathch"},{"line_number":11,"context_line":"fixes it and a functional test will be added in Zaqar client."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Partial-Bug: #1529168"},{"line_number":14,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"bae84128_59a9d57a","line":11,"range":{"start_line":11,"start_character":15,"end_line":11,"end_character":60},"updated":"2016-02-22 00:42:57.000000000","message":"It\u0027s good that the functional test will be added to Zaqar client, but maybe there must be also functional test in Zaqar server?\nThe functional tests should check in the first place the program to which they belong.\nIf there will be no test in Zaqar and a patch to Zaqar server will be merged, which will make functional test in Zaqar client fail, we will only notice the problem after merge.","commit_id":"d7cfcde671debd0531a266a197e2518ae638ad4f"}],"zaqar/storage/redis/models.py":[{"author":{"_account_id":18683,"name":"Eva Balycheva","email":"ubershy@gmail.com","username":"eva"},"change_message_id":"043c196c5454650931c905d84b809ff5b7908e62","unresolved":false,"context_lines":[{"line_number":297,"context_line":"        \u0027source\u0027: hmap[b\u0027s\u0027],"},{"line_number":298,"context_line":"        \u0027subscriber\u0027: hmap[b\u0027u\u0027],"},{"line_number":299,"context_line":"        \u0027ttl\u0027: int(hmap[b\u0027t\u0027]),"},{"line_number":300,"context_line":"        \u0027expires\u0027: str(hmap[b\u0027e\u0027]),"},{"line_number":301,"context_line":"        \u0027options\u0027: _unpack(hmap[b\u0027o\u0027])"},{"line_number":302,"context_line":"    }"},{"line_number":303,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"7af24918_880d9bea","line":300,"range":{"start_line":300,"start_character":19,"end_line":300,"end_character":22},"updated":"2016-03-03 00:00:06.000000000","message":"I want to keep linux time (int). See my comment in subscriptions.py.\nIf you still want to change format, you should probably also modify L265, L125.","commit_id":"407c833925d69b4573be796d325c3ce1e796585e"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"d2ba604e9b67a7dfe238f555746494803350370a","unresolved":false,"context_lines":[{"line_number":297,"context_line":"        \u0027source\u0027: hmap[b\u0027s\u0027],"},{"line_number":298,"context_line":"        \u0027subscriber\u0027: hmap[b\u0027u\u0027],"},{"line_number":299,"context_line":"        \u0027ttl\u0027: int(hmap[b\u0027t\u0027]),"},{"line_number":300,"context_line":"        \u0027expires\u0027: str(hmap[b\u0027e\u0027]),"},{"line_number":301,"context_line":"        \u0027options\u0027: _unpack(hmap[b\u0027o\u0027])"},{"line_number":302,"context_line":"    }"},{"line_number":303,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"7af24918_0e8fd075","line":300,"range":{"start_line":300,"start_character":19,"end_line":300,"end_character":22},"in_reply_to":"7af24918_880d9bea","updated":"2016-03-03 02:45:02.000000000","message":"Based on the discussion on IRC, let\u0027s keep it as int for now.","commit_id":"407c833925d69b4573be796d325c3ce1e796585e"}],"zaqar/storage/redis/subscriptions.py":[{"author":{"_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"},"change_message_id":"e989d6050fc451e439933d5ff744f2576c213d58","unresolved":false,"context_lines":[{"line_number":134,"context_line":"                pipe.sadd(member_key, subscriber)"},{"line_number":135,"context_line":"                pipe.zadd(subset_key, 1,"},{"line_number":136,"context_line":"                          subscription_id).hmset(subscription_id, subscription)"},{"line_number":137,"context_line":"                pipe.setex(subscription_id, ttl, subscription)"},{"line_number":138,"context_line":"                pipe.execute()"},{"line_number":139,"context_line":"            return subscription_id"},{"line_number":140,"context_line":"        except redis.exceptions.ResponseError:"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a5ae5dd_41fcf571","line":137,"updated":"2016-02-05 07:07:38.000000000","message":"how about use expire(self, name, time) in StrictRedis to set ttl?","commit_id":"c11d69de1404b15fb019edb38f003e62afbecc8e"},{"author":{"_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"},"change_message_id":"75ddec7b4cf14dc8d449885807c11a9dcaa4d606","unresolved":false,"context_lines":[{"line_number":134,"context_line":"                pipe.sadd(member_key, subscriber)"},{"line_number":135,"context_line":"                pipe.zadd(subset_key, 1,"},{"line_number":136,"context_line":"                          subscription_id).hmset(subscription_id, subscription)"},{"line_number":137,"context_line":"                pipe.expire(subscription_id, ttl)"},{"line_number":138,"context_line":"                pipe.execute()"},{"line_number":139,"context_line":"            return subscription_id"},{"line_number":140,"context_line":"        except redis.exceptions.ResponseError:"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a5ae5dd_56325060","line":137,"range":{"start_line":137,"start_character":48,"end_line":137,"end_character":49},"updated":"2016-02-06 02:37:50.000000000","message":"use \"expire\" here to set ttl to subscription.\n\nBut I found that we create there sections in redis here:\n\n{tenant_id}.test-queue.subscribers,\n{tenant_id}.test-queue.subscriptions,\n{subscription_id}\n\nL137 only set ttl to {subscription_id}. I\u0027 not sure whether set ttl to other two sections or not. So leave this question to flwang.\n\nIf yes, we can also use\npip.expire(member_key, ttl)\npip.expire(subset_key, tll)\n\nI know it\u0027s ugly here. But \"setex\" seems can\u0027t work with a dict(just individual opinion).","commit_id":"d7cfcde671debd0531a266a197e2518ae638ad4f"},{"author":{"_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"},"change_message_id":"9e7064504b57ee6acd24178018577e2265839978","unresolved":false,"context_lines":[{"line_number":134,"context_line":"                pipe.sadd(member_key, subscriber)"},{"line_number":135,"context_line":"                pipe.zadd(subset_key, 1,"},{"line_number":136,"context_line":"                          subscription_id).hmset(subscription_id, subscription)"},{"line_number":137,"context_line":"                pipe.expire(subscription_id, ttl)"},{"line_number":138,"context_line":"                pipe.execute()"},{"line_number":139,"context_line":"            return subscription_id"},{"line_number":140,"context_line":"        except redis.exceptions.ResponseError:"}],"source_content_type":"text/x-python","patch_set":2,"id":"dae33548_f5392043","line":137,"range":{"start_line":137,"start_character":48,"end_line":137,"end_character":49},"in_reply_to":"3a57f1b5_39308956","updated":"2016-02-14 06:27:15.000000000","message":"I found that we can use the callback mechanism in redis. But we should enable it in redis.conf first.(notify-keyspace-events----it\u0027s disabled default). Maybe this is not the best way. It\u0027s too open to users.\n\nUsing lua script seems better. So what problem do you meet about member_key? can\u0027t we simply use srem(self, name, *values) there?","commit_id":"d7cfcde671debd0531a266a197e2518ae638ad4f"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"8e933578f5f3795ab8f63e33713f84ba933d95f3","unresolved":false,"context_lines":[{"line_number":134,"context_line":"                pipe.sadd(member_key, subscriber)"},{"line_number":135,"context_line":"                pipe.zadd(subset_key, 1,"},{"line_number":136,"context_line":"                          subscription_id).hmset(subscription_id, subscription)"},{"line_number":137,"context_line":"                pipe.expire(subscription_id, ttl)"},{"line_number":138,"context_line":"                pipe.execute()"},{"line_number":139,"context_line":"            return subscription_id"},{"line_number":140,"context_line":"        except redis.exceptions.ResponseError:"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a57f1b5_39308956","line":137,"range":{"start_line":137,"start_character":48,"end_line":137,"end_character":49},"in_reply_to":"5a5ae5dd_46e61016","updated":"2016-02-10 00:07:08.000000000","message":"Yes, we can expire the subscription by pipe.expire(subscription_id, ttl), since subscription_id is a key, so in redis you can expire it like that. But unfortunately, we can\u0027t expire member_key and subset_key since member_key is a \u0027set\u0027 to make sure there is no duplicate subscriber. subset_key is used to store all the subscription_id. So, we can\u0027t expire the two keys since it will impact all the other subscriptions.\n\nSo now the problem is how to remove the subscription_id from subnet_key and the subscriber from member_key. We could work out a lua script to clean the subnet_key, but I haven\u0027t work out a good way to clean the member_key.","commit_id":"d7cfcde671debd0531a266a197e2518ae638ad4f"},{"author":{"_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"},"change_message_id":"7c68c687f96447a555b38a993c7d267db4e6bd12","unresolved":false,"context_lines":[{"line_number":134,"context_line":"                pipe.sadd(member_key, subscriber)"},{"line_number":135,"context_line":"                pipe.zadd(subset_key, 1,"},{"line_number":136,"context_line":"                          subscription_id).hmset(subscription_id, subscription)"},{"line_number":137,"context_line":"                pipe.expire(subscription_id, ttl)"},{"line_number":138,"context_line":"                pipe.execute()"},{"line_number":139,"context_line":"            return subscription_id"},{"line_number":140,"context_line":"        except redis.exceptions.ResponseError:"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a5ae5dd_46e61016","line":137,"range":{"start_line":137,"start_character":48,"end_line":137,"end_character":49},"in_reply_to":"5a5ae5dd_56325060","updated":"2016-02-07 01:56:08.000000000","message":"s/there/three","commit_id":"d7cfcde671debd0531a266a197e2518ae638ad4f"},{"author":{"_account_id":18683,"name":"Eva Balycheva","email":"ubershy@gmail.com","username":"eva"},"change_message_id":"8a27403407146d62b103f90a5af7cddd34d6fefd","unresolved":false,"context_lines":[{"line_number":134,"context_line":"                pipe.sadd(member_key, subscriber)"},{"line_number":135,"context_line":"                pipe.zadd(subset_key, 1,"},{"line_number":136,"context_line":"                          subscription_id).hmset(subscription_id, subscription)"},{"line_number":137,"context_line":"                pipe.expire(subscription_id, ttl)"},{"line_number":138,"context_line":"                pipe.execute()"},{"line_number":139,"context_line":"            return subscription_id"},{"line_number":140,"context_line":"        except redis.exceptions.ResponseError:"}],"source_content_type":"text/x-python","patch_set":2,"id":"bae84128_b9bc616d","line":137,"range":{"start_line":137,"start_character":48,"end_line":137,"end_character":49},"in_reply_to":"dae33548_f5392043","updated":"2016-02-22 00:42:57.000000000","message":"I\u0027ll check callback mechanism tomorrow and tell you what I think.\n\nMaybe we can use second solution as described in this answer: https://github.com/antirez/redis/issues/167#issuecomment-2559040\n\nI mean store expiration date as additional field in set\u0027s row. And make Zaqar check particular row\u0027s expiration date on each query in sets \u003cproject_id\u003e.\u003cqueue_name\u003e.subscriptions and \u003cproject_id\u003e.\u003cqueue_name\u003e.subscribers. If the date is expired, make Zaqar delete the row.\n\nAs you can notice rows in \u003cproject_id\u003e.\u003cqueue_name\u003e.claims and \u003cproject_id\u003e.\u003cqueue_name\u003e.messages are not being cleaned also from expired rows.\nI even discovered that uncleaned rows lead to a bug: https://bugs.launchpad.net/zaqar/+bug/1548135\n\nBut look: \u003cproject_id\u003e.\u003cqueue_name\u003e.claims contains expiration date in each row as score:\nhttps://github.com/openstack/zaqar/blob/master/zaqar/storage/redis/claims.py#L302\nHowever, score in a row is not used for cleaning expired claims, maybe Zaqarians forgot to fully implement it.","commit_id":"d7cfcde671debd0531a266a197e2518ae638ad4f"},{"author":{"_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"},"change_message_id":"356e8b2b017bb26189c8a06b206ccf4d4b6079ed","unresolved":false,"context_lines":[{"line_number":147,"context_line":"                                                      project,"},{"line_number":148,"context_line":"                                                      SUBSCRIPTION_IDS_SUFFIX)"},{"line_number":149,"context_line":"        try:"},{"line_number":150,"context_line":"            with self._client.pipeline() as pipe:"},{"line_number":151,"context_line":"                sub_ids \u003d (q for q in pipe.zrange(subset_key, 0, -1))"},{"line_number":152,"context_line":"                for s_id in sub_ids:"},{"line_number":153,"context_line":"                    subscription \u003d pipe.hmget(s_id, [\u0027s\u0027, \u0027u\u0027, \u0027t\u0027, \u0027o\u0027])"}],"source_content_type":"text/x-python","patch_set":3,"id":"9aed3d3a_18f1d495","line":150,"updated":"2016-02-29 07:43:54.000000000","message":"redis would do nothing until \"pipe.execute()\". So we should not use pipeline() here. we could use self._client directly here:\n\ntry:\n    sub_ids \u003d (q for q in self._client.zrange(subset_key, 0, -1))\n    for s_id in sub_ids:\n        subscription \u003d self._client.hmget(s_id, [\u0027s\u0027, \u0027u\u0027, \u0027t\u0027, \u0027o\u0027])\n        if subscription \u003d\u003d [None, None, None, None]:\n            # NOTE(flwang): Under this check, that means the\n            # subscription has been expired. So redis can\u0027t get\n            # the subscription but the id is still there. So let\u0027s\n            # delete the id for clean up.\n            self._client.zrem(subset_key, s_id)\n        if subscription[1] \u003d\u003d subscriber:\n            return True\n    return False\nexcept redis.exceptions.ResponseError:\n    return True","commit_id":"5dbeb108ad41c2ece1160237fa35ce8d5ba19533"},{"author":{"_account_id":8846,"name":"Hao Wang","display_name":"Hao Wang","email":"sxmatch1986@gmail.com","username":"sxmatch"},"change_message_id":"d752c8715d8d9008c63b5016c65c82cf9e144b08","unresolved":false,"context_lines":[{"line_number":147,"context_line":"                                                      project,"},{"line_number":148,"context_line":"                                                      SUBSCRIPTION_IDS_SUFFIX)"},{"line_number":149,"context_line":"        try:"},{"line_number":150,"context_line":"            with self._client.pipeline() as pipe:"},{"line_number":151,"context_line":"                sub_ids \u003d (q for q in pipe.zrange(subset_key, 0, -1))"},{"line_number":152,"context_line":"                for s_id in sub_ids:"},{"line_number":153,"context_line":"                    subscription \u003d pipe.hmget(s_id, [\u0027s\u0027, \u0027u\u0027, \u0027t\u0027, \u0027o\u0027])"}],"source_content_type":"text/x-python","patch_set":3,"id":"7af24918_269de165","line":150,"in_reply_to":"9aed3d3a_18f1d495","updated":"2016-03-02 03:58:24.000000000","message":"Done","commit_id":"5dbeb108ad41c2ece1160237fa35ce8d5ba19533"},{"author":{"_account_id":18683,"name":"Eva Balycheva","email":"ubershy@gmail.com","username":"eva"},"change_message_id":"043c196c5454650931c905d84b809ff5b7908e62","unresolved":false,"context_lines":[{"line_number":32,"context_line":""},{"line_number":33,"context_line":"SUBSET_INDEX_KEY \u003d \u0027subset_index\u0027"},{"line_number":34,"context_line":"SUBSCRIPTION_IDS_SUFFIX \u003d \u0027subscriptions\u0027"},{"line_number":35,"context_line":"SUBSCRIBERS_SUFFIX \u003d \u0027subscribers\u0027"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"class SubscriptionController(base.Subscription):"}],"source_content_type":"text/x-python","patch_set":5,"id":"7af24918_883f5b86","line":35,"range":{"start_line":35,"start_character":0,"end_line":35,"end_character":34},"updated":"2016-03-03 00:00:06.000000000","message":"No longer needed?","commit_id":"407c833925d69b4573be796d325c3ce1e796585e"},{"author":{"_account_id":18683,"name":"Eva Balycheva","email":"ubershy@gmail.com","username":"eva"},"change_message_id":"043c196c5454650931c905d84b809ff5b7908e62","unresolved":false,"context_lines":[{"line_number":96,"context_line":"                                                       self._client)"},{"line_number":97,"context_line":"        now \u003d timeutils.utcnow_ts()"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"        if subscription and not utils.subscription_expired_filter(subscription,"},{"line_number":100,"context_line":"                                                                  now):"},{"line_number":101,"context_line":"            return subscription.to_basic(now)"},{"line_number":102,"context_line":"        else:"},{"line_number":103,"context_line":"            raise errors.SubscriptionDoesNotExist(subscription_id)"}],"source_content_type":"text/x-python","patch_set":5,"id":"7af24918_0354ccc7","line":100,"range":{"start_line":99,"start_character":32,"end_line":100,"end_character":71},"updated":"2016-03-03 00:00:06.000000000","message":"Because this patch changed format of \"e\" field, this function will be no longer executed correctly. But we don\u0027t see bad behavior, I know why, but it\u0027s hard to explain.\nMaybe we should delete this function, because seems like it is not needed now, when our subscription expire and deleted from database automatically.","commit_id":"407c833925d69b4573be796d325c3ce1e796585e"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"d2ba604e9b67a7dfe238f555746494803350370a","unresolved":false,"context_lines":[{"line_number":96,"context_line":"                                                       self._client)"},{"line_number":97,"context_line":"        now \u003d timeutils.utcnow_ts()"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"        if subscription and not utils.subscription_expired_filter(subscription,"},{"line_number":100,"context_line":"                                                                  now):"},{"line_number":101,"context_line":"            return subscription.to_basic(now)"},{"line_number":102,"context_line":"        else:"},{"line_number":103,"context_line":"            raise errors.SubscriptionDoesNotExist(subscription_id)"}],"source_content_type":"text/x-python","patch_set":5,"id":"7af24918_4ed5581a","line":100,"range":{"start_line":99,"start_character":32,"end_line":100,"end_character":71},"in_reply_to":"7af24918_0354ccc7","updated":"2016-03-03 02:45:02.000000000","message":"Done","commit_id":"407c833925d69b4573be796d325c3ce1e796585e"},{"author":{"_account_id":18683,"name":"Eva Balycheva","email":"ubershy@gmail.com","username":"eva"},"change_message_id":"043c196c5454650931c905d84b809ff5b7908e62","unresolved":false,"context_lines":[{"line_number":112,"context_line":""},{"line_number":113,"context_line":"        source \u003d queue"},{"line_number":114,"context_line":"        now \u003d timeutils.utcnow_ts()"},{"line_number":115,"context_line":"        now_dt \u003d datetime.datetime.utcfromtimestamp(now)"},{"line_number":116,"context_line":"        expire \u003d now_dt + datetime.timedelta(seconds\u003dttl)"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"        subscription \u003d {\u0027id\u0027: subscription_id,"}],"source_content_type":"text/x-python","patch_set":5,"id":"7af24918_83073c17","line":115,"range":{"start_line":115,"start_character":17,"end_line":115,"end_character":56},"updated":"2016-03-03 00:00:06.000000000","message":"I think we shouldn\u0027t change the format of expire field. Reasons:\n\n1. Linux time format is faster to process. It will be needed for calculating \"age\". It is\n   also smaller.\n2. No need for this field to be human readable.\n   Yes, we expose this field for the user on \"get\" method now, but I think it\u0027s a mistake. \n   It is mistake, because:\n      1. Our mongodb driver doesn\u0027t show time field on \"get\" method for subscriptions.\n      2. Our redis driver doesn\u0027t show time field on \"list\" method for subscriptions.\n      3. Our redis driver doesn\u0027t show time field on \"get\" method for claims.\n   Instead in all drivers for subscriptions we should make expose \"age\" field\n   (calculate it), like in all drivers for MOST of the resources: exposing \"age\" + \"ttl\"\n   is enough for the user to determine when the resource will expire. I want to make a\n   separate patch that will make subscriptions expose \"age\".\n   I like the idea to show expiration date everywhere more than showing \"age\" + \"ttl\",\n   but it would require more work and it would be less backward compatible.","commit_id":"407c833925d69b4573be796d325c3ce1e796585e"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"d2ba604e9b67a7dfe238f555746494803350370a","unresolved":false,"context_lines":[{"line_number":112,"context_line":""},{"line_number":113,"context_line":"        source \u003d queue"},{"line_number":114,"context_line":"        now \u003d timeutils.utcnow_ts()"},{"line_number":115,"context_line":"        now_dt \u003d datetime.datetime.utcfromtimestamp(now)"},{"line_number":116,"context_line":"        expire \u003d now_dt + datetime.timedelta(seconds\u003dttl)"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"        subscription \u003d {\u0027id\u0027: subscription_id,"}],"source_content_type":"text/x-python","patch_set":5,"id":"7af24918_ee1544e5","line":115,"range":{"start_line":115,"start_character":17,"end_line":115,"end_character":56},"in_reply_to":"7af24918_83073c17","updated":"2016-03-03 02:45:02.000000000","message":"Done","commit_id":"407c833925d69b4573be796d325c3ce1e796585e"},{"author":{"_account_id":18683,"name":"Eva Balycheva","email":"ubershy@gmail.com","username":"eva"},"change_message_id":"043c196c5454650931c905d84b809ff5b7908e62","unresolved":false,"context_lines":[{"line_number":113,"context_line":"        source \u003d queue"},{"line_number":114,"context_line":"        now \u003d timeutils.utcnow_ts()"},{"line_number":115,"context_line":"        now_dt \u003d datetime.datetime.utcfromtimestamp(now)"},{"line_number":116,"context_line":"        expire \u003d now_dt + datetime.timedelta(seconds\u003dttl)"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"        subscription \u003d {\u0027id\u0027: subscription_id,"},{"line_number":119,"context_line":"                        \u0027s\u0027: source,"}],"source_content_type":"text/x-python","patch_set":5,"id":"7af24918_237bc88d","line":116,"range":{"start_line":116,"start_character":8,"end_line":116,"end_character":14},"updated":"2016-03-03 00:00:06.000000000","message":"I like \"expires\" name more. In all methods in utils.py and models.py name \"expires\" is used.","commit_id":"407c833925d69b4573be796d325c3ce1e796585e"},{"author":{"_account_id":18683,"name":"Eva Balycheva","email":"ubershy@gmail.com","username":"eva"},"change_message_id":"43288a1b8fceb2ae722a418639dff439866cb88e","unresolved":false,"context_lines":[{"line_number":113,"context_line":"        source \u003d queue"},{"line_number":114,"context_line":"        now \u003d timeutils.utcnow_ts()"},{"line_number":115,"context_line":"        now_dt \u003d datetime.datetime.utcfromtimestamp(now)"},{"line_number":116,"context_line":"        expire \u003d now_dt + datetime.timedelta(seconds\u003dttl)"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"        subscription \u003d {\u0027id\u0027: subscription_id,"},{"line_number":119,"context_line":"                        \u0027s\u0027: source,"}],"source_content_type":"text/x-python","patch_set":5,"id":"7af24918_d843f240","line":116,"range":{"start_line":116,"start_character":8,"end_line":116,"end_character":14},"in_reply_to":"7af24918_237bc88d","updated":"2016-03-03 00:37:28.000000000","message":"It\u0027s just a NIT. Forgot to add.","commit_id":"407c833925d69b4573be796d325c3ce1e796585e"},{"author":{"_account_id":18683,"name":"Eva Balycheva","email":"ubershy@gmail.com","username":"eva"},"change_message_id":"043c196c5454650931c905d84b809ff5b7908e62","unresolved":false,"context_lines":[{"line_number":128,"context_line":"        try:"},{"line_number":129,"context_line":"            # Pipeline ensures atomic inserts."},{"line_number":130,"context_line":"            with self._client.pipeline() as pipe:"},{"line_number":131,"context_line":"                if not self._is_duplicated_subscriber(subscriber,"},{"line_number":132,"context_line":"                                                      queue,"},{"line_number":133,"context_line":"                                                      project):"},{"line_number":134,"context_line":"                    pipe.zadd(subset_key, 1,"}],"source_content_type":"text/x-python","patch_set":5,"id":"7af24918_dd15a7e5","line":131,"updated":"2016-03-03 00:00:06.000000000","message":"NIT: I would like to see a comment here, that this function has side effect: it is deleting expired ids.\nOr maybe we should decouple functionality if it will not affect performance.","commit_id":"407c833925d69b4573be796d325c3ce1e796585e"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"d2ba604e9b67a7dfe238f555746494803350370a","unresolved":false,"context_lines":[{"line_number":128,"context_line":"        try:"},{"line_number":129,"context_line":"            # Pipeline ensures atomic inserts."},{"line_number":130,"context_line":"            with self._client.pipeline() as pipe:"},{"line_number":131,"context_line":"                if not self._is_duplicated_subscriber(subscriber,"},{"line_number":132,"context_line":"                                                      queue,"},{"line_number":133,"context_line":"                                                      project):"},{"line_number":134,"context_line":"                    pipe.zadd(subset_key, 1,"}],"source_content_type":"text/x-python","patch_set":5,"id":"7af24918_8edbe04e","line":131,"in_reply_to":"7af24918_dd15a7e5","updated":"2016-03-03 02:45:02.000000000","message":"Make sense for me.","commit_id":"407c833925d69b4573be796d325c3ce1e796585e"}],"zaqar/storage/redis/utils.py":[{"author":{"_account_id":18683,"name":"Eva Balycheva","email":"ubershy@gmail.com","username":"eva"},"change_message_id":"043c196c5454650931c905d84b809ff5b7908e62","unresolved":false,"context_lines":[{"line_number":122,"context_line":"    return (tokens[1] or None, tokens[0] or None)"},{"line_number":123,"context_line":""},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"def scope_subscribers_set(queue\u003dNone, project\u003dNone,"},{"line_number":126,"context_line":"                          subscriber_suffix\u003d\u0027\u0027):"},{"line_number":127,"context_line":""},{"line_number":128,"context_line":"    return \"%s.%s.%s\" % (normalize_none_str(project),"}],"source_content_type":"text/x-python","patch_set":5,"id":"7af24918_e89a5f6d","line":125,"range":{"start_line":125,"start_character":4,"end_line":125,"end_character":25},"updated":"2016-03-03 00:00:06.000000000","message":"No longer needed?","commit_id":"407c833925d69b4573be796d325c3ce1e796585e"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"d2ba604e9b67a7dfe238f555746494803350370a","unresolved":false,"context_lines":[{"line_number":122,"context_line":"    return (tokens[1] or None, tokens[0] or None)"},{"line_number":123,"context_line":""},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"def scope_subscribers_set(queue\u003dNone, project\u003dNone,"},{"line_number":126,"context_line":"                          subscriber_suffix\u003d\u0027\u0027):"},{"line_number":127,"context_line":""},{"line_number":128,"context_line":"    return \"%s.%s.%s\" % (normalize_none_str(project),"}],"source_content_type":"text/x-python","patch_set":5,"id":"7af24918_eeec24f5","line":125,"range":{"start_line":125,"start_character":4,"end_line":125,"end_character":25},"in_reply_to":"7af24918_e89a5f6d","updated":"2016-03-03 02:45:02.000000000","message":"Done","commit_id":"407c833925d69b4573be796d325c3ce1e796585e"}]}
