DAQ: updates to spreadhseet and tell updater to use beamline enum/value
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user