diff --git a/src/aare/daq/spreadsheetupdater.py b/src/aare/daq/spreadsheetupdater.py index f0872d56..08842294 100644 --- a/src/aare/daq/spreadsheetupdater.py +++ b/src/aare/daq/spreadsheetupdater.py @@ -7,7 +7,8 @@ from aare.common.models import SampleShortInfoList, SampleShortInfo, DewarAddres from config import BeamlineConfig from aare.common.beamline import MXBeamline, mx_beamline -SLOT_IDENTIFIER = "X10SA" +beamline = mx_beamline() +SLOT_IDENTIFIER = beamline.value.upper() WS_URL = f"wss://mx-db-01.psi.ch/dispatcher/protected_router/tell_runner/ws/samples-spreadsheet/{SLOT_IDENTIFIER}" # Ensure the environment variable for the shared password is set @@ -16,9 +17,8 @@ if not password: raise ValueError("The AAREDB_SHARED_PASSWORD environment variable is not set.") WS_HEADERS = [f"X-Shared-Password: {password}"] -beamline = "X10SA" #mx_beamline().value() -config = BeamlineConfig(bl=beamline) +config = BeamlineConfig(bl=beamline) # Cache the current spreadsheet for change detection current_spreadsheet = None diff --git a/src/aare/daq/tellupdater.py b/src/aare/daq/tellupdater.py index 9ca5ba39..6e6b7baa 100644 --- a/src/aare/daq/tellupdater.py +++ b/src/aare/daq/tellupdater.py @@ -12,16 +12,16 @@ from aaredb import AareWrapper # Make sure the import path fits your project from aare.common.beamline import MXBeamline, mx_beamline # Configuration -#SLOT_IDENTIFIER = mx_beamline().value.upper() -SLOT_IDENTIFIER = "X10SA" +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://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 -beamline = "X10SA" #mx_beamline().value() # Use your beamline enum/value -tell_client = None #TellClient(bl=beamline) + # Use your beamline enum/value +tell_client = TellClient(bl=beamline) aare_db = AareWrapper(bl=beamline) # Track current state