Indexer: additional work on the multithreaded version

This commit is contained in:
2024-09-16 10:35:43 +03:00
parent eec4ebbbfc
commit 862efc5cbd
2 changed files with 8 additions and 5 deletions

View File

@@ -14,6 +14,9 @@ from asgiref.sync import sync_to_async
from django.core.management.base import BaseCommand
from GaiaDBInterface.models import GaiaSource, CatalogFile
def input_with_timeout(prompt, timeout=30):
print(prompt, end='', flush=True)
ready, _, _ = select.select([sys.stdin], [], [], timeout)
@@ -167,7 +170,7 @@ class Command(BaseCommand):
self.stdout.write(f"[{current_time()}] {ingested_files_count}/{len(catalog_files)}")
del df, gaiasource_fields, common_fields, df_filtered, data_dict
gc.collect()