)]}'
{"marconi/queues/storage/sqlalchemy/controllers.py":[{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"fd22c4109fa5e7e57145ff14f537d7b1ff0c7008","unresolved":false,"context_lines":[{"line_number":16,"context_line":""},{"line_number":17,"context_line":"\"\"\"Exports SQLite driver controllers.\"\"\""},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"from marconi.queues.storage.sqlite import queues"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"QueueController \u003d queues.QueueController"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F9Wyw%3D","line":19,"updated":"2014-02-07 14:07:25.000000000","message":"sqlalchemy*","commit_id":"041dc473ef6206492c0abea5f9d23b588b3105bd"},{"author":{"_account_id":6944,"name":"Allele Dev","email":"cpp.cabrera@gmail.com","username":"cpp-cabrera"},"change_message_id":"00977083a712d83f5bb7a50c683e4a1d25cad6f3","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright (c) 2013 Rackspace, Inc."},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"# Licensed under the Apache License, Version 2.0 (the \"License\");"},{"line_number":4,"context_line":"# you may not use this file except in compliance with the License."}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUH%2F9WR4%3D","line":1,"updated":"2014-02-07 15:24:16.000000000","message":"*2014* - keeps tripping me up, too. New years are weird. :P","commit_id":"7e8dcccb64aacbeec6ce4cbd9989eb059f7e66f8"}],"marconi/queues/storage/sqlalchemy/driver.py":[{"author":{"_account_id":6944,"name":"Allele Dev","email":"cpp.cabrera@gmail.com","username":"cpp-cabrera"},"change_message_id":"00977083a712d83f5bb7a50c683e4a1d25cad6f3","unresolved":false,"context_lines":[{"line_number":60,"context_line":"        :param args: the arguments to substitute the placeholders"},{"line_number":61,"context_line":"        \"\"\""},{"line_number":62,"context_line":"        with self.engine.begin() as connection:"},{"line_number":63,"context_line":"            return connection.execute(statement)"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    def get(self, statement):"},{"line_number":66,"context_line":"        \"\"\"Runs %sql and returns the first entry in the results."}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUH%2F9WRQ%3D","line":63,"updated":"2014-02-07 15:24:16.000000000","message":"+1 - this is exactly what I was looking for in the previous patch. If you rebase on top of the config + ControlDriver patch, could you remove my TODO wrt to open/close connection?\n\nIt might also be worthwhile to remove the close_connection method.","commit_id":"7e8dcccb64aacbeec6ce4cbd9989eb059f7e66f8"}],"marconi/queues/storage/sqlalchemy/queues.py":[{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"e754f9c14d80a058cb53b89bbc362a302548a083","unresolved":false,"context_lines":[{"line_number":37,"context_line":"            sel \u003d sa.sql.select([tables.Queues.c.name],"},{"line_number":38,"context_line":"                                       tables.Queues.c.project\u003d\u003dproject)"},{"line_number":39,"context_line":"        else:"},{"line_number":40,"context_line":"            sel \u003d sa.sql.select([tables.Queues.c.name,"},{"line_number":41,"context_line":"                                tables.Queues.c.metadata],"},{"line_number":42,"context_line":"                                tables.Queues.c.project\u003d\u003dproject)"},{"line_number":43,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F9wGc%3D","line":40,"updated":"2014-02-04 11:40:07.000000000","message":"What about doing something like this:\n\n  fields \u003d [tables.Queues.c.name]\n\n  if detailed:\n      fields.append(tables.Queues.c.metadata)\n\n  sel \u003d sa.sql.select(fields, tables.Queues.c.project\u003d\u003dproject)","commit_id":"4da46862289931064f615630c11f9f5a3674c0d1"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"e754f9c14d80a058cb53b89bbc362a302548a083","unresolved":false,"context_lines":[{"line_number":67,"context_line":"            project \u003d \u0027\u0027"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"        ins \u003d tables.Queues.insert().values(id\u003dNone, project\u003dproject,"},{"line_number":70,"context_line":"                                            name\u003dname, metadata\u003d\"\\x80\")"},{"line_number":71,"context_line":"        res \u003d self.driver.run(ins)"},{"line_number":72,"context_line":"        return res.rowcount \u003d\u003d 1"},{"line_number":73,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F9wGI%3D","line":70,"updated":"2014-02-04 11:40:07.000000000","message":"I think you need to rebase your code. `\\x80` is not necessary anymore, you can just use \u0027{}\u0027","commit_id":"4da46862289931064f615630c11f9f5a3674c0d1"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"e754f9c14d80a058cb53b89bbc362a302548a083","unresolved":false,"context_lines":[{"line_number":81,"context_line":"                            ))"},{"line_number":82,"context_line":"        res \u003d self.driver.run(sel)"},{"line_number":83,"context_line":"        r \u003d res.fetchone()"},{"line_number":84,"context_line":"        res.close()"},{"line_number":85,"context_line":"        return r is not None"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"    def set_metadata(self, name, metadata, project):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F9wFc%3D","line":84,"updated":"2014-02-04 11:40:07.000000000","message":"you call `res.close()` here but not everywhere in the driver. Doesn\u0027t sqlalchemy have a context manager for this operations? if not, I guess you could change the `run` method to do something like:\n\n   with self.driver.run(...) as res:\n       # do something here\n\nThe `self.driver.run` method would call `res.close` at the end of the context","commit_id":"4da46862289931064f615630c11f9f5a3674c0d1"}]}
