File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -118,9 +118,9 @@ def auto_log_material_files():
118118 c = conn .cursor ()
119119 # Ensure uniqueness constraint exists
120120 c .execute ("""
121- CREATE UNIQUE INDEX IF NOT EXISTS idx_unique_uploads
122- ON uploads_log(property, tab, filename )
123- """ )
121+ INSERT OR IGNORE INTO uploads_log(property, tab, filename, logged_at)
122+ VALUES (?, ?, ?, CURRENT_TIMESTAMP )
123+ """ , ( property , tab , filename ) )
124124 conn .commit ()
125125
126126 for root , dirs , files in os .walk (UPLOAD_FOLDER ):
@@ -669,7 +669,11 @@ def extract_drive_id(link):
669669 print (rule .endpoint , rule )
670670
671671auto_import_uploads ()
672- auto_log_material_files ()
672+ try :
673+ auto_log_material_files ()
674+ except Exception as e :
675+ print ("auto_log_material_files skipped:" , e )
676+
673677
674678# ========== MAIN ==========
675679if __name__ == '__main__' :
You can’t perform that action at this time.
0 commit comments