)]}'
{"placement/handlers/util.py":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"809f63cb33bafa900678e594a6a46df285ab5f96","unresolved":true,"context_lines":[{"line_number":25,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"def get_or_create_consumer_type_id(ctx, name):"},{"line_number":29,"context_line":"    \"\"\"Tries to fetch the provided consumer_type and creates a new one if it"},{"line_number":30,"context_line":"    does not exist."},{"line_number":31,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"68fdf926_403ed09f","line":28,"range":{"start_line":28,"start_character":4,"end_line":28,"end_character":34},"updated":"2021-08-25 18:12:27.000000000","message":"+1 thanks","commit_id":"406b1c5c03d2909f46edbd6d3e96ede37379b7ad"}],"placement/objects/usage.py":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"809f63cb33bafa900678e594a6a46df285ab5f96","unresolved":true,"context_lines":[{"line_number":84,"context_line":"                    contains an oslo_db Session"},{"line_number":85,"context_line":"    :param project_id: The project ID for which to get usages"},{"line_number":86,"context_line":"    :param user_id: The optional user ID for which to get usages"},{"line_number":87,"context_line":"    :param consumer_type: Optionally group usages under one key, \"all\" or"},{"line_number":88,"context_line":"                          \"unknown\". If \"all\" is specified, all results will be"},{"line_number":89,"context_line":"                          grouped under one key, \"all\". If \"unknown\" is"},{"line_number":90,"context_line":"                          specified, all results will be grouped under one key,"},{"line_number":91,"context_line":"                          \"unknown\"."},{"line_number":92,"context_line":"    \"\"\""},{"line_number":93,"context_line":"    query \u003d (context.session.query(models.Allocation.resource_class_id,"},{"line_number":94,"context_line":"             func.coalesce(func.sum(models.Allocation.used), 0))"}],"source_content_type":"text/x-python","patch_set":1,"id":"ef2f7c44_332f5dd2","line":91,"range":{"start_line":87,"start_character":4,"end_line":91,"end_character":36},"updated":"2021-08-25 18:12:27.000000000","message":"this still confuses me a bit but it  thin im following the code\nwhich is defeintly more clear so +1\n\n\n\ni might have written it as\n\nOptionally group usages by consumer type, \"all\" or\n\"unknown\". If \"all\" is specified, all results will be\n grouped under one key, \"all\". If \"unknown\" is\nspecified, all results will be grouped under one key,\n\"unknown\".\n\n\nalthough i dont thinkt this is right.\n\nif you pass unknow we set \n   models.Consumer.consumer_type_id \u003d\u003d sa.null()\nso we only count the and quey the uage where the consumer type is unset.\n\n\nisthe not really filter ing usage by consumer type\n\nso\nOptionally filter usages by consumer type, \"all\" or\n\"unknown\". If \"all\" is specified, all results will be\n grouped under one key, \"all\". If \"unknown\" is\nspecified, all results will be grouped under one key,\n\"unknown\".\n\ni think that better felect the filtering and grouping.","commit_id":"406b1c5c03d2909f46edbd6d3e96ede37379b7ad"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"452b664b28b930499469fa8ba8baece9b0396acf","unresolved":false,"context_lines":[{"line_number":84,"context_line":"                    contains an oslo_db Session"},{"line_number":85,"context_line":"    :param project_id: The project ID for which to get usages"},{"line_number":86,"context_line":"    :param user_id: The optional user ID for which to get usages"},{"line_number":87,"context_line":"    :param consumer_type: Optionally group usages under one key, \"all\" or"},{"line_number":88,"context_line":"                          \"unknown\". If \"all\" is specified, all results will be"},{"line_number":89,"context_line":"                          grouped under one key, \"all\". If \"unknown\" is"},{"line_number":90,"context_line":"                          specified, all results will be grouped under one key,"},{"line_number":91,"context_line":"                          \"unknown\"."},{"line_number":92,"context_line":"    \"\"\""},{"line_number":93,"context_line":"    query \u003d (context.session.query(models.Allocation.resource_class_id,"},{"line_number":94,"context_line":"             func.coalesce(func.sum(models.Allocation.used), 0))"}],"source_content_type":"text/x-python","patch_set":1,"id":"9461cb86_ae7a0643","line":91,"range":{"start_line":87,"start_character":4,"end_line":91,"end_character":36},"in_reply_to":"ef2f7c44_332f5dd2","updated":"2021-08-25 18:23:50.000000000","message":"Done","commit_id":"406b1c5c03d2909f46edbd6d3e96ede37379b7ad"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"809f63cb33bafa900678e594a6a46df285ab5f96","unresolved":true,"context_lines":[{"line_number":133,"context_line":""},{"line_number":134,"context_line":"        result \u003d [dict(resource_class\u003dcontext.rc_cache.string_from_id(item[0]),"},{"line_number":135,"context_line":"                       usage\u003ditem[1],"},{"line_number":136,"context_line":"                       consumer_type\u003dconsumer_type,"},{"line_number":137,"context_line":"                       consumer_count\u003dnumber_of_unique_consumers)"},{"line_number":138,"context_line":"                  for item in query.all()]"},{"line_number":139,"context_line":"    else:"}],"source_content_type":"text/x-python","patch_set":1,"id":"ed9e1765_96f79bb2","line":136,"range":{"start_line":136,"start_character":0,"end_line":136,"end_character":1},"updated":"2021-08-25 18:12:27.000000000","message":"this is the only placem weher the all value is actully used.","commit_id":"406b1c5c03d2909f46edbd6d3e96ede37379b7ad"}]}
