)]}'
{"glance/cmd/manage.py":[{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"822973e7272c13d52dacf1645087bf6d63ffa301","unresolved":false,"context_lines":[{"line_number":150,"context_line":"    @args(\u0027--age_in_days\u0027, type\u003dint,"},{"line_number":151,"context_line":"          help\u003d\u0027Purge deleted rows older than age in days\u0027)"},{"line_number":152,"context_line":"    def purge(self, age_in_days\u003d30):"},{"line_number":153,"context_line":"        \"\"\"Purge deleted rows older than a given age from glance tables.\"\"\""},{"line_number":154,"context_line":"        age_in_days \u003d int(age_in_days)"},{"line_number":155,"context_line":"        if age_in_days \u003c\u003d 0:"},{"line_number":156,"context_line":"            print(_(\"Must supply a positive, non-zero value for age\"))"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa1b9901_802c2f03","line":153,"updated":"2015-08-25 17:30:05.000000000","message":"Maybe you should say that this only affects the Image and Task tables?","commit_id":"f97e928ed10927d01f4b79406e1f4846a5e9b486"},{"author":{"_account_id":5241,"name":"Martin Magr","email":"mmagr@redhat.com","username":"mmagr"},"change_message_id":"8d1b949b7c4547bbbcc5266cf973d04336297b63","unresolved":false,"context_lines":[{"line_number":150,"context_line":"    @args(\u0027--age_in_days\u0027, type\u003dint,"},{"line_number":151,"context_line":"          help\u003d\u0027Purge deleted rows older than age in days\u0027)"},{"line_number":152,"context_line":"    def purge(self, age_in_days\u003d30):"},{"line_number":153,"context_line":"        \"\"\"Purge deleted rows older than a given age from glance tables.\"\"\""},{"line_number":154,"context_line":"        age_in_days \u003d int(age_in_days)"},{"line_number":155,"context_line":"        if age_in_days \u003c\u003d 0:"},{"line_number":156,"context_line":"            print(_(\"Must supply a positive, non-zero value for age\"))"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa1b9901_499b7b18","line":153,"in_reply_to":"fa1b9901_802c2f03","updated":"2015-08-26 12:33:11.000000000","message":"Done","commit_id":"f97e928ed10927d01f4b79406e1f4846a5e9b486"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"cc2b4015e54397c64d3f2408d3dc8bd2268e5774","unresolved":false,"context_lines":[{"line_number":148,"context_line":"        metadata.db_export_metadefs(db_api.get_engine(),"},{"line_number":149,"context_line":"                                    path)"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"    @args(\u0027--age_in_days\u0027, type\u003dint,"},{"line_number":152,"context_line":"          help\u003d\u0027Purge deleted rows older than age in days\u0027)"},{"line_number":153,"context_line":"    def purge(self, age_in_days\u003d30):"},{"line_number":154,"context_line":"        \"\"\"Purge deleted rows older than a given age from glance tables.\"\"\""}],"source_content_type":"text/x-python","patch_set":6,"id":"9a8ffd7b_4a0ce0ec","line":151,"updated":"2015-11-27 12:49:43.000000000","message":"does this need the `--`? I thought that was automatic.","commit_id":"b46c8e3e6dc8e97c950ba931e619fde7648f4f89"},{"author":{"_account_id":5241,"name":"Martin Magr","email":"mmagr@redhat.com","username":"mmagr"},"change_message_id":"9aab15aff188f084140163f9ba5f7a2d8cdc1dc5","unresolved":false,"context_lines":[{"line_number":148,"context_line":"        metadata.db_export_metadefs(db_api.get_engine(),"},{"line_number":149,"context_line":"                                    path)"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"    @args(\u0027--age_in_days\u0027, type\u003dint,"},{"line_number":152,"context_line":"          help\u003d\u0027Purge deleted rows older than age in days\u0027)"},{"line_number":153,"context_line":"    def purge(self, age_in_days\u003d30):"},{"line_number":154,"context_line":"        \"\"\"Purge deleted rows older than a given age from glance tables.\"\"\""}],"source_content_type":"text/x-python","patch_set":6,"id":"7a740942_ef8e2ecf","line":151,"in_reply_to":"9a8ffd7b_4a0ce0ec","updated":"2015-12-07 15:58:48.000000000","message":"I\u0027m just being consistent with existing code. If \u0027--\u0027 is not necessary I can remove it of course.","commit_id":"b46c8e3e6dc8e97c950ba931e619fde7648f4f89"}],"glance/context.py":[{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"cc2b4015e54397c64d3f2408d3dc8bd2268e5774","unresolved":false,"context_lines":[{"line_number":62,"context_line":""},{"line_number":63,"context_line":"def get_admin_context(show_deleted\u003dFalse):"},{"line_number":64,"context_line":"    \"\"\"Create an administrator context.\"\"\""},{"line_number":65,"context_line":"    context \u003d RequestContext(auth_token\u003dNone,"},{"line_number":66,"context_line":"                             tenant\u003dNone,"},{"line_number":67,"context_line":"                             is_admin\u003dTrue,"},{"line_number":68,"context_line":"                             show_deleted\u003dshow_deleted,"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a8ffd7b_8ae08897","line":65,"updated":"2015-11-27 12:49:43.000000000","message":"I wonder if we can do away with this function and just call `context.RequestContext` since this is just being used in one place for now.","commit_id":"b46c8e3e6dc8e97c950ba931e619fde7648f4f89"},{"author":{"_account_id":5241,"name":"Martin Magr","email":"mmagr@redhat.com","username":"mmagr"},"change_message_id":"9aab15aff188f084140163f9ba5f7a2d8cdc1dc5","unresolved":false,"context_lines":[{"line_number":62,"context_line":""},{"line_number":63,"context_line":"def get_admin_context(show_deleted\u003dFalse):"},{"line_number":64,"context_line":"    \"\"\"Create an administrator context.\"\"\""},{"line_number":65,"context_line":"    context \u003d RequestContext(auth_token\u003dNone,"},{"line_number":66,"context_line":"                             tenant\u003dNone,"},{"line_number":67,"context_line":"                             is_admin\u003dTrue,"},{"line_number":68,"context_line":"                             show_deleted\u003dshow_deleted,"}],"source_content_type":"text/x-python","patch_set":6,"id":"7a740942_6a01cc69","line":65,"in_reply_to":"9a8ffd7b_8ae08897","updated":"2015-12-07 15:58:48.000000000","message":"Done","commit_id":"b46c8e3e6dc8e97c950ba931e619fde7648f4f89"}],"glance/db/sqlalchemy/api.py":[{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"822973e7272c13d52dacf1645087bf6d63ffa301","unresolved":false,"context_lines":[{"line_number":1211,"context_line":"    delete_age \u003d timeutils.utcnow() - datetime.timedelta(days\u003dage_in_days)"},{"line_number":1212,"context_line":"    LOG.info(_LI(\u0027Purging deleted rows older than age\u003d%(age)d days\u0027),"},{"line_number":1213,"context_line":"             {\u0027age\u0027: age_in_days})"},{"line_number":1214,"context_line":"    for model in (models.Image, models.Task):"},{"line_number":1215,"context_line":"        condition \u003d sa_sql.and_("},{"line_number":1216,"context_line":"            model.deleted \u003d\u003d True, model.deleted_at \u003c\u003d delete_age"},{"line_number":1217,"context_line":"        )"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa1b9901_0056df5b","line":1214,"updated":"2015-08-25 17:30:05.000000000","message":"The image properties, image members, image tags, and image locations are also soft-deleted ... is there a reason why you don\u0027t purge those as well?","commit_id":"f97e928ed10927d01f4b79406e1f4846a5e9b486"},{"author":{"_account_id":5241,"name":"Martin Magr","email":"mmagr@redhat.com","username":"mmagr"},"change_message_id":"8d1b949b7c4547bbbcc5266cf973d04336297b63","unresolved":false,"context_lines":[{"line_number":1211,"context_line":"    delete_age \u003d timeutils.utcnow() - datetime.timedelta(days\u003dage_in_days)"},{"line_number":1212,"context_line":"    LOG.info(_LI(\u0027Purging deleted rows older than age\u003d%(age)d days\u0027),"},{"line_number":1213,"context_line":"             {\u0027age\u0027: age_in_days})"},{"line_number":1214,"context_line":"    for model in (models.Image, models.Task):"},{"line_number":1215,"context_line":"        condition \u003d sa_sql.and_("},{"line_number":1216,"context_line":"            model.deleted \u003d\u003d True, model.deleted_at \u003c\u003d delete_age"},{"line_number":1217,"context_line":"        )"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa1b9901_0946e37a","line":1214,"in_reply_to":"fa1b9901_0056df5b","updated":"2015-08-26 12:33:11.000000000","message":"They are deleted indeed. By iterating through \"dependent_objects(obj)\" every row which has foreign key to obj will be deleted.","commit_id":"f97e928ed10927d01f4b79406e1f4846a5e9b486"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"1b0367a8287a16676101a7f3ea0fb0b690b7c832","unresolved":false,"context_lines":[{"line_number":1193,"context_line":""},{"line_number":1194,"context_line":"def _delete_object(session, obj):"},{"line_number":1195,"context_line":"    table \u003d obj.__tablename__"},{"line_number":1196,"context_line":"    LOG.debug(\u0027Deleting row with id {} from table {}\u0027.formay(obj.id, table))"},{"line_number":1197,"context_line":"    session.delete(obj)"},{"line_number":1198,"context_line":""},{"line_number":1199,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"fa1b9901_d4fabf76","line":1196,"updated":"2015-08-26 13:37:16.000000000","message":"formay \u003e\u003e format","commit_id":"f203ba417bce5b923c1981336259264313849ea7"},{"author":{"_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"},"change_message_id":"ba335315ee34c17db9a42ee710d4f0ec34501188","unresolved":false,"context_lines":[{"line_number":1215,"context_line":"    delete_age \u003d timeutils.utcnow() - datetime.timedelta(days\u003dage_in_days)"},{"line_number":1216,"context_line":"    LOG.info(_LI(\u0027Purging deleted rows older than age\u003d%(age)d days\u0027),"},{"line_number":1217,"context_line":"             {\u0027age\u0027: age_in_days})"},{"line_number":1218,"context_line":"    for model in (models.Image, models.Task):"},{"line_number":1219,"context_line":"        condition \u003d sa_sql.and_("},{"line_number":1220,"context_line":"            model.deleted \u003d\u003d True, model.deleted_at \u003c\u003d delete_age"},{"line_number":1221,"context_line":"        )"}],"source_content_type":"text/x-python","patch_set":3,"id":"da20952f_f3884773","line":1218,"updated":"2015-08-31 02:41:16.000000000","message":"I think image and task could be handled separately.\ni.e. add another parameter like : --type image, --type task or --type all (just example). Because User maybe just want delete only image or task in some case.","commit_id":"a35d450993346d804efb9a70a329ca26f3a87ae8"},{"author":{"_account_id":5241,"name":"Martin Magr","email":"mmagr@redhat.com","username":"mmagr"},"change_message_id":"3f9375bbbddfb7317bb0e4e7a8c9d2e706fe6738","unresolved":false,"context_lines":[{"line_number":1215,"context_line":"    delete_age \u003d timeutils.utcnow() - datetime.timedelta(days\u003dage_in_days)"},{"line_number":1216,"context_line":"    LOG.info(_LI(\u0027Purging deleted rows older than age\u003d%(age)d days\u0027),"},{"line_number":1217,"context_line":"             {\u0027age\u0027: age_in_days})"},{"line_number":1218,"context_line":"    for model in (models.Image, models.Task):"},{"line_number":1219,"context_line":"        condition \u003d sa_sql.and_("},{"line_number":1220,"context_line":"            model.deleted \u003d\u003d True, model.deleted_at \u003c\u003d delete_age"},{"line_number":1221,"context_line":"        )"}],"source_content_type":"text/x-python","patch_set":3,"id":"da20952f_77e6dee9","line":1218,"in_reply_to":"da20952f_f3884773","updated":"2015-09-02 10:57:44.000000000","message":"This requirement is not currently stated in the spec [1] and neither other OpenStack services (able to purge DB) does not support such feature. But in case it will be added to the spec, I don\u0027t mind adding such parameter.\n\n[1] https://review.openstack.org/#/c/132659/","commit_id":"a35d450993346d804efb9a70a329ca26f3a87ae8"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"cc2b4015e54397c64d3f2408d3dc8bd2268e5774","unresolved":false,"context_lines":[{"line_number":1239,"context_line":"        with session.begin():"},{"line_number":1240,"context_line":"            for obj in session.query(model).filter(condition).all():"},{"line_number":1241,"context_line":"                for dep in dependent_objects(obj):"},{"line_number":1242,"context_line":"                    _delete_object(session, dep)"},{"line_number":1243,"context_line":"                    dep_count +\u003d 1"},{"line_number":1244,"context_line":"                _delete_object(session, obj)"},{"line_number":1245,"context_line":"                model_count +\u003d 1"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a8ffd7b_a5749f67","line":1242,"updated":"2015-11-27 12:49:43.000000000","message":"Do we need to delete record by record? On big tables this may take a long time.","commit_id":"b46c8e3e6dc8e97c950ba931e619fde7648f4f89"},{"author":{"_account_id":5241,"name":"Martin Magr","email":"mmagr@redhat.com","username":"mmagr"},"change_message_id":"9aab15aff188f084140163f9ba5f7a2d8cdc1dc5","unresolved":false,"context_lines":[{"line_number":1239,"context_line":"        with session.begin():"},{"line_number":1240,"context_line":"            for obj in session.query(model).filter(condition).all():"},{"line_number":1241,"context_line":"                for dep in dependent_objects(obj):"},{"line_number":1242,"context_line":"                    _delete_object(session, dep)"},{"line_number":1243,"context_line":"                    dep_count +\u003d 1"},{"line_number":1244,"context_line":"                _delete_object(session, obj)"},{"line_number":1245,"context_line":"                model_count +\u003d 1"}],"source_content_type":"text/x-python","patch_set":6,"id":"7a740942_cad9e023","line":1242,"in_reply_to":"9a8ffd7b_a5749f67","updated":"2015-12-07 15:58:48.000000000","message":"I will probably refactor the logic to work with tables directly and will take your objection in to account, thanks.","commit_id":"b46c8e3e6dc8e97c950ba931e619fde7648f4f89"}]}
