monitor.py to restart ingester periodically hopefully avoiding memory leaks.
This commit is contained in:
@@ -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())
|
||||
|
Reference in New Issue
Block a user