gitea workflows: tellupdater dependendency on mx_beamline() moved to if __name__=="main". and put if name is None: return MXBeamline.SIMULATED.
Build and Publish / test (push) Failing after 1m32s
Build and Publish / build (push) Has been skipped
Build and Publish / Build and Deploy Docs (push) Has been skipped

This commit is contained in:
appleb_m committed 2026-04-27 17:08:08 +02:00
1 parent e76be9fe25
commit 02cfbde470
2 files changed
+16 -14

No files matched your search

+2
View File
@@ -11,5 +11,7 @@ class MXBeamline(Enum):
def mx_beamline() -> MXBeamline:
name = os.getenv("BEAMLINE")
if name is None:
return MXBeamline.SIMULATED
name=name.strip().upper()
return MXBeamline[name] if name in MXBeamline.__members__ else MXBeamline.SIMULATED
+14 -14
View File
@@ -15,20 +15,6 @@ from aare.common.beamline import MXBeamline, mx_beamline
logger = setup_logger("aareDAQ")
# Configuration
beamline = mx_beamline()
SLOT_IDENTIFIER = beamline.value.upper()
#WS_URL = f"wss://mx-db-01.psi.ch/dispatcher/protected_router/wstell/ws/slot/{SLOT_IDENTIFIER}"
WS_URL = f"wss://mx-aaredb-dmz-01.psi.ch/dispatcher/protected_router/wstell/ws/slot/{SLOT_IDENTIFIER}"
#WS_URL = f"wss://localhost:8001/protected_router/wstell/ws/slot/{SLOT_IDENTIFIER}"
WS_HEADERS = [f"X-Shared-Password: {os.getenv('AAREDB_SHARED_PASSWORD')}"]
print(WS_HEADERS)
# Initialize TELL client and DB wrapper
# Use your beamline enum/value
tell_client = TellClient(bl=beamline)
aare_db = AareWrapper(bl=beamline)
# Track current state
current_pucks = []
last_pucks_sent = []
@@ -209,4 +195,18 @@ def main():
time.sleep(5)
if __name__ == "__main__":
# Configuration
beamline = mx_beamline()
SLOT_IDENTIFIER = beamline.value.upper()
# WS_URL = f"wss://mx-db-01.psi.ch/dispatcher/protected_router/wstell/ws/slot/{SLOT_IDENTIFIER}"
WS_URL = f"wss://mx-aaredb-dmz-01.psi.ch/dispatcher/protected_router/wstell/ws/slot/{SLOT_IDENTIFIER}"
# WS_URL = f"wss://localhost:8001/protected_router/wstell/ws/slot/{SLOT_IDENTIFIER}"
WS_HEADERS = [f"X-Shared-Password: {os.getenv('AAREDB_SHARED_PASSWORD')}"]
print(WS_HEADERS)
# Initialize TELL client and DB wrapper
# Use your beamline enum/value
tell_client = TellClient(bl=beamline)
aare_db = AareWrapper(bl=beamline)
main()