debug with logger warning
Build and Publish / test (push) Failing after 13m54s
Build and Publish / build (push) Skipped
Build and Publish / Build and Deploy Docs (push) Skipped

This commit is contained in:
2026-06-30 16:50:40 +02:00
parent cfa1cd669d
commit 0af58574b2
+7 -7
View File
@@ -80,35 +80,35 @@ async def lifespan(application: FastAPI):
each worker gets its own fresh Redis, BEC, EPICS, and TELL connections.
"""
global bl, cfg, daq
print(f"something!!!")
logger.warning(f"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()
print(f"something after bl!!!")
logger.warning(f"something after bl!!!")
cfg = BeamlineConfig(bl)
print(f"something after cfg!!!")
logger.warning(f"something after cfg!!!")
daq = AareDAQ(cfg, bl)
print(f"something after daq!!!")
logger.warning(f"something after daq!!!")
try:
cfg.reset_automation_progress()
except Exception as e:
logger.warning(f"Failed to reset automation progress Redis keys: {e}")
print(f"something after reset automation!!!")
logger.warning(f"something after reset automation!!!")
try:
daq.refresh_detector_metadata_cache()
except Exception as e:
logger.warning(f"Initial hardware metadata refresh failed: {e}")
print(f"something after refresh detector metadata!!!")
logger.warning(f"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}")
print(f"something after sync current sample!!!")
logger.warning(f"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)