diff --git a/image_import_worker.py b/image_import_worker.py index 95a0067..5d58ae8 100644 --- a/image_import_worker.py +++ b/image_import_worker.py @@ -13,6 +13,9 @@ CHECK_INTERVAL = 10 # seconds app = create_app() +from sqlalchemy.exc import OperationalError +import time + def monitor_and_import(): with app.app_context(): print("[Image Importer] Monitoring for trigger flag...") @@ -84,7 +87,5 @@ def monitor_and_import(): print(f"[Image Importer] Failed to remove thumbnail flag: {e}") - time.sleep(CHECK_INTERVAL) - if __name__ == '__main__': monitor_and_import()