refining logging messages
This commit is contained in:
@@ -18,11 +18,11 @@ import time
|
|||||||
|
|
||||||
def monitor_and_import():
|
def monitor_and_import():
|
||||||
with app.app_context():
|
with app.app_context():
|
||||||
print("[Image Importer] Monitoring for trigger flag...")
|
print("[Image Importer] Monitoring for trigger flags...")
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
if os.path.exists(TRIGGER_FLAG):
|
if os.path.exists(TRIGGER_FLAG):
|
||||||
print("[Image Importer] Trigger flag found. Starting import...")
|
print("[Image Importer] Import flag found. Starting import...")
|
||||||
max_retries = 3
|
max_retries = 3
|
||||||
attempt = 0
|
attempt = 0
|
||||||
|
|
||||||
@@ -46,9 +46,9 @@ def monitor_and_import():
|
|||||||
finally:
|
finally:
|
||||||
try:
|
try:
|
||||||
os.remove(TRIGGER_FLAG)
|
os.remove(TRIGGER_FLAG)
|
||||||
print("[Image Importer] Trigger flag cleared.")
|
print("[Image Importer] Import flag cleared.")
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(f"[Image Importer] Failed to remove trigger flag: {e}")
|
print(f"[Image Importer] Failed to remove import flag: {e}")
|
||||||
|
|
||||||
if os.path.exists(THUMBNAIL_FLAG):
|
if os.path.exists(THUMBNAIL_FLAG):
|
||||||
print("[Image Importer] Thumbnail regeneration triggered.")
|
print("[Image Importer] Thumbnail regeneration triggered.")
|
||||||
|
|||||||
Reference in New Issue
Block a user