monitor.py to restart ingester periodically hopefully avoiding memory leaks.

This commit is contained in:
2024-09-12 14:30:59 +03:00
parent 83888cd2f9
commit 3acef66a89
2 changed files with 26 additions and 2 deletions

View File

@@ -42,7 +42,7 @@ class Command(BaseCommand):
#fetching the file list
directory = input_with_timeout(f"[{current_time()}] Please enter the path to the directory containing the csv files [{previous_choice}]: ", 30)
directory = input_with_timeout(f"[{current_time()}] Please enter the path to the directory containing the csv files, timeout 60 seconds [{previous_choice}]: ", 60)
if not directory:
directory = previous_choice
@@ -170,6 +170,6 @@ class Command(BaseCommand):
# Create a completion flag file
with open("ingester_done.flag", "w") as f:
f.write("done")
print("Ingester done")
print(f"[{current_time()}] Ingester done.")
asyncio.run(ingest_files())