fix: remove excess warning logs
Build and Publish / test (pull_request) Successful in 2m15s
Build and Publish / test (pull_request_target) Successful in 2m8s
Build and Publish / test (push) Successful in 2m22s
Build and Publish / build (pull_request) Successful in 16s
Build and Publish / build (pull_request_target) Successful in 17s
Build and Publish / build (push) Successful in 17s
Build and Publish / Build and Deploy Docs (pull_request) Successful in 33s
Build and Publish / Build and Deploy Docs (pull_request_target) Failing after 33s
Build and Publish / Build and Deploy Docs (push) Successful in 40s

This commit was merged in pull request #101.
This commit is contained in:
2026-07-09 15:23:34 +02:00
parent 89564a55e1
commit f821c2dd99
-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)