|
@@ -190,7 +190,8 @@ |
|
|
|
|
|
|
|
|
def synchronize_sites_with_db(cursor, updates, q_list, q_rmv, q_update): |
|
|
def synchronize_sites_with_db(cursor, updates, q_list, q_rmv, q_update): |
|
|
removals = [] |
|
|
removals = [] |
|
|
for site in cursor.execute(q_list): |
|
|
|
|
|
|
|
|
cursor.execute(q_list) |
|
|
|
|
|
for site in cursor: |
|
|
updates.remove(site) if site in updates else removals.append(site) |
|
|
updates.remove(site) if site in updates else removals.append(site) |
|
|
cursor.executemany(q_rmv, removals) |
|
|
cursor.executemany(q_rmv, removals) |
|
|
cursor.executemany(q_update, updates) |
|
|
cursor.executemany(q_update, updates) |
|
|