]> git.etc.gen.nz Git - whoisi.git/commitdiff
Make more runQuery calls work with the new Pg library.
authorAndrew Ruthven <andrew@etc.gen.nz>
Mon, 22 Jun 2009 20:54:16 +0000 (08:54 +1200)
committerAndrew Ruthven <andrew@cerberus.etc.gen.nz>
Mon, 22 Jun 2009 20:54:16 +0000 (08:54 +1200)
services/master/database.py

index f78bea0487c24555d9dbc958ed481b0cda5c3efe..272a208257506e0963147def7fc9c17f825b59f9 100644 (file)
@@ -129,7 +129,7 @@ class DatabaseManager:
         q = """
             SELECT id, url FROM new_site WHERE status = 'new' and id > %s
             """
-        d = self.runQuery(q, self.new_site_last_id)
+        d = self.runQuery(q, [ self.new_site_last_id ])
         d.addCallback(self.gotNewSites)
         d.addErrback(self.errorHandler)
 
@@ -166,7 +166,7 @@ class DatabaseManager:
         q = """
             SELECT id, url FROM new_site WHERE status = 'url_picked' and id > %s
             """
-        d = self.runQuery(q, self.picked_site_last_id)
+        d = self.runQuery(q, [ self.picked_site_last_id ])
         d.addErrback(self.errorHandler)
         d.addCallback(self.gotPickedSites)
 
@@ -200,7 +200,7 @@ class DatabaseManager:
             FROM site_refresh, site WHERE
             site_refresh.site_id = site.id and site_refresh.status = 'new' and site_refresh.id > %s
             """
-        d = self.runQuery(q, self.refresh_last_id)
+        d = self.runQuery(q, [ self.refresh_last_id ])
         d.addCallback(self.gotRefresh)
         d.addErrback(self.errorHandler)
 
@@ -281,7 +281,7 @@ class DatabaseManager:
             SELECT id, url FROM new_site WHERE status = 'preview' and id > %s
             """
 
-        d = self.runQuery(q, self.preview_site_last_id)
+        d = self.runQuery(q, [ self.preview_site_last_id ])
         d.addCallback(self.gotPreviewSites)
         d.addErrback(self.errorHandler)