mirror of
https://github.com/simon987/od-database.git
synced 2025-12-13 23:09:01 +00:00
Overwrite document on re-index, update website last_modified on task complete, delete website files on index complete
This commit is contained in:
@@ -45,6 +45,14 @@ class Database:
|
||||
conn.executescript(init_script)
|
||||
conn.commit()
|
||||
|
||||
def update_website_date_if_exists(self, website_id):
|
||||
|
||||
with sqlite3.connect(self.db_path) as conn:
|
||||
|
||||
cursor = conn.cursor()
|
||||
cursor.execute("UPDATE Website SET last_modified=CURRENT_TIMESTAMP WHERE id=?", (website_id, ))
|
||||
conn.commit()
|
||||
|
||||
def insert_website(self, website: Website):
|
||||
|
||||
with sqlite3.connect(self.db_path) as conn:
|
||||
|
||||
Reference in New Issue
Block a user