q = """
SELECT id, url, last_poll from site where is_removed is null and id > %s
"""
- d = self.master.database_manager.runQuery(q, self.site_check_last_id)
+ d = self.master.database_manager.runQuery(q, [ self.site_check_last_id ])
d.addCallback(self.gotNewSites)
d.addErrback(self.newSitesError)
q = """
INSERT INTO site_refresh values (NULL, %s, "new", NULL)
"""
- d = self.master.database_manager.runQuery(q, site.id)
+ d = self.master.database_manager.runQuery(self.newInteraction, q, [ site.id ])
d.addErrback(self.error)
+ def newInteraction(self, trans, *args):
+ trans.execute(*args)
+ return true
+
def error(self, failure):
print("error: %s" % failure.getErrorMessage())