Comment out SQL update logic in Dbexec class for verification; adjust sleep duration in JSON downloader to reduce server load; enhance logging in update_mongo.py for clarity on processing updates.
This commit is contained in:
@@ -24,12 +24,13 @@ class Dbexec():
|
||||
)
|
||||
]
|
||||
|
||||
print('Applying updates to table.')
|
||||
with engine.connect() as conn:
|
||||
conn.execute(text(f"truncate table {tablename}"))
|
||||
conn.execute(tablename.insert(), updatelist)
|
||||
conn.commit()
|
||||
print('Update of tvupdates table is complete.')
|
||||
# Commented out code for applying updates for now. Will re-enable later after downloads are verified.
|
||||
# print('Applying updates to table.')
|
||||
# with engine.connect() as conn:
|
||||
# conn.execute(text(f"truncate table {tablename}"))
|
||||
# conn.execute(tablename.insert(), updatelist)
|
||||
# conn.commit()
|
||||
# print('Update of tvupdates table is complete.')
|
||||
|
||||
def rawsql_select(self, engine, sqlquery, lprint):
|
||||
session = Session(engine)
|
||||
|
||||
Reference in New Issue
Block a user