fix: remove excess warning logs #101

Merged
perl_d merged 1 commits from fix/remove_logs into master 2026-07-09 15:52:06 +02:00
-7
View File
@@ -96,35 +96,28 @@ async def lifespan(application: FastAPI):
each worker gets its own fresh Redis, BEC, EPICS, and TELL connections.
"""
global bl, cfg, daq
logger.warning("something!!!")
await asyncio.sleep(random.uniform(0.5, 3.0))
logger.info(f"Worker {os.getpid()} starting initialisation...")
# ── Core objects (Redis, EPICS PVs, BEC, TELL, JFJoch, etc.) ──
bl = mx_beamline()
logger.warning("something after bl!!!")
cfg = BeamlineConfig(bl)
logger.warning("something after cfg!!!")
daq = AareDAQ(cfg, bl)
logger.warning("something after daq!!!")
try:
cfg.reset_automation_progress()
except Exception as e:
logger.warning(f"Failed to reset automation progress Redis keys: {e}")
logger.warning("something after reset automation!!!")
try:
daq.refresh_detector_metadata_cache()
except Exception as e:
logger.warning(f"Initial hardware metadata refresh failed: {e}")
logger.warning("something after refresh detector metadata!!!")
# ── Initial TELL sync ──
try:
daq.sync_current_sample_from_tell(force=True)
except Exception as e:
logger.warning(f"Initial sample sync from TELL failed: {e}")
logger.warning("something after sync current sample!!!")
# ── Wire callbacks ──
daq.set_face_detection_progress_callback(_push_face_detection_progress)
daq.set_automation_progress_callback(_push_automation_progress)