initial functionality and styling pass

This commit is contained in:
Bryan Van Deusen
2025-07-29 00:34:03 -04:00
parent 1590ca72c1
commit c67f1afc1f
1763 changed files with 876 additions and 76 deletions
+20
View File
@@ -0,0 +1,20 @@
# image_import_loop.py
import time
from app import create_app
from app.utils.image_importer import import_images_task
app = create_app()
def looped_import(source_dir='/import', dest_dir='/images', delay_seconds=7200):
with app.app_context():
print("[Image Importer] Starting import task...")
try:
result = import_images_task(source_dir, dest_dir)
print(f"[Image Importer] {result}")
except Exception as e:
print(f"[Image Importer] Error: {e}")
print(f"[Image Importer] Sleeping for {delay_seconds / 3600:.1f} hours...\n")
time.sleep(delay_seconds)
if __name__ == '__main__':
looped_import()