Try fix Recursive use of cursors ProgrammingError by creating new cursor for every execute and move Lock to db
This commit is contained in:
parent
afd23849a6
commit
fca9db7972
6 changed files with 51 additions and 27 deletions
|
@ -79,7 +79,7 @@ class ContentDbPlugin(object):
|
|||
cur = self.getCursor()
|
||||
try:
|
||||
cur.execute("DELETE FROM peer WHERE site_id = :site_id", {"site_id": site_id})
|
||||
cur.cursor.executemany(
|
||||
cur.executemany(
|
||||
"INSERT INTO peer (site_id, address, port, hashfield, reputation, time_added, time_found) VALUES (?, ?, ?, ?, ?, ?, ?)",
|
||||
self.iteratePeers(site)
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue