made ingester functional without inputs in preparation for a monitor script restarting it

This commit is contained in:
2024-09-12 11:45:02 +03:00
parent 2ea452cf81
commit e37387b68f
2 changed files with 17 additions and 5 deletions

View File

@@ -3,6 +3,7 @@ from GaiaDBInterface.models import GaiaSource, CatalogFile
from astropy.coordinates import SkyCoord
import astropy_healpix as ah
import numpy as np
from datetime import datetime, timedelta
def current_time():
return (datetime.now() + timedelta(hours=3)).strftime("%H:%M:%S")
@@ -13,7 +14,7 @@ def healpix():
ORDER='ring'
for catalog_file in CatalogFile.objects.all():
print(f'[{current_time()}] Loading sources from the database...')
sources = list(catalog_file.sources.all())
print(f'[{current_time()}] Sources ready. Forming ra & dec arrays...')