From: Andrew Ruthven Date: Mon, 22 Jun 2009 20:54:16 +0000 (+1200) Subject: Make more runQuery calls work with the new Pg library. X-Git-Url: http://git.etc.gen.nz/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bdfcf70f426a800cda4779f27e2e2f49862e3ccc;p=whoisi.git Make more runQuery calls work with the new Pg library. --- diff --git a/services/master/database.py b/services/master/database.py index f78bea0..272a208 100644 --- a/services/master/database.py +++ b/services/master/database.py @@ -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)