diff --git a/compose.yaml b/compose.yaml index 43e1ba3b..2dd4b8db 100644 --- a/compose.yaml +++ b/compose.yaml @@ -71,6 +71,8 @@ services: - PATH_TO_CLIENT_CERT - PATH_TO_VERIFY_CERT - POSTGRES_PASSWORD + - PRESELECTOR_CLASS + - PRESELECTOR_MODULE - SCOS_SENSOR_GIT_TAG - SECRET_KEY - SIGAN_MODULE diff --git a/env.template b/env.template index 592edd9c..ed42266e 100644 --- a/env.template +++ b/env.template @@ -79,6 +79,8 @@ SIGAN_MODULE=scos_tekrsa.hardware.tekrsa_sigan USB_DEVICE=Tektronix DEVICE_MODEL=RSA507A BASE_IMAGE=ghcr.io/ntia/scos-tekrsa/tekrsa_usb:latest +PRESELECTOR_MODULE="its_preselector.web_relay_preselector" +PRESELECTOR_CLASS="WebRelayPreselector" # SECURITY WARNING: You should be using certs from a trusted authority. # If you don't have any, try letsencrypt or a similar service. diff --git a/src/initialization/__init__.py b/src/initialization/__init__.py index 82822e38..53149c89 100644 --- a/src/initialization/__init__.py +++ b/src/initialization/__init__.py @@ -54,7 +54,7 @@ def load_preselector( logger.debug( f"loading {preselector_class_name} from {module} with config: {preselector_config}" ) - if module is not None and preselector_class_name is not None: + if module and preselector_class_name: preselector_module = importlib.import_module(module) preselector_constructor = getattr(preselector_module, preselector_class_name) preselector_config = load_from_json(preselector_config)