From 50d4f8e42595af5f5aa063a834c2a5a01919f2bc Mon Sep 17 00:00:00 2001 From: x01dc Date: Tue, 18 Aug 2026 14:42:10 +0200 Subject: [PATCH] feat(flomni,lamni): repoint all omny endpoints from myfritz/omny-test to omny.psi.ch Cuts over the webpage status-page mirror, TomoIDManager's sample-counter registration, and the samples-folder PDF upload to omny.psi.ch exclusively, replacing v1p0zyg2w9n2k9c1.myfritz.net and omny-test.psi.ch everywhere. Note: omny.psi.ch currently has known server-side issues (a permission error on /upload.php, and a WAF blocking /samples/* outright) tracked separately with PSI admins -- this switch is expected to be broken until those are fixed. Co-Authored-By: Claude Sonnet 5 --- csaxs_bec/bec_ipython_client/plugins/LamNI/lamni.py | 8 +------- .../plugins/OMNY_shared/omny_general_tools.py | 4 ++-- .../plugins/OMNY_shared/tomo_queue_mixin.py | 10 ++++------ csaxs_bec/bec_ipython_client/plugins/flomni/flomni.py | 9 +-------- 4 files changed, 8 insertions(+), 23 deletions(-) diff --git a/csaxs_bec/bec_ipython_client/plugins/LamNI/lamni.py b/csaxs_bec/bec_ipython_client/plugins/LamNI/lamni.py index 942ef136..7a88df3e 100644 --- a/csaxs_bec/bec_ipython_client/plugins/LamNI/lamni.py +++ b/csaxs_bec/bec_ipython_client/plugins/LamNI/lamni.py @@ -251,13 +251,7 @@ class LamNI(TomoQueueMixin, LamNIAlignmentMixin, LamNIOpticsMixin, LamniGuiTools self._webpage_gen = LamniWebpageGenerator( bec_client=client, output_dir="~/data/raw/webpage/", - upload_url=[ - "https://v1p0zyg2w9n2k9c1.myfritz.net/upload.php", - # TEMP: mirroring to the test server while it's evaluated -- - # drop this line once omny-test.psi.ch is confirmed or the trial ends. - "https://omny-test.psi.ch/upload.php", - "https://omny.psi.ch/upload.php", - ], + upload_url="https://omny.psi.ch/upload.php", local_port=8080, ) self._webpage_gen.start() diff --git a/csaxs_bec/bec_ipython_client/plugins/OMNY_shared/omny_general_tools.py b/csaxs_bec/bec_ipython_client/plugins/OMNY_shared/omny_general_tools.py index a93600da..218105fa 100644 --- a/csaxs_bec/bec_ipython_client/plugins/OMNY_shared/omny_general_tools.py +++ b/csaxs_bec/bec_ipython_client/plugins/OMNY_shared/omny_general_tools.py @@ -347,8 +347,8 @@ class TomoIDManager: ) """ - OMNY_URL = "https://v1p0zyg2w9n2k9c1.myfritz.net/samples/newmeasurement.php" - TEST_OMNY_URL = "https://omny-test.psi.ch/samples/newmeasurement.php" + OMNY_URL = "https://omny.psi.ch/samples/newmeasurement.php" + TEST_OMNY_URL = "https://omny.psi.ch/samples/newmeasurement.php" FALLBACK_TOMO_ID = 0 @staticmethod diff --git a/csaxs_bec/bec_ipython_client/plugins/OMNY_shared/tomo_queue_mixin.py b/csaxs_bec/bec_ipython_client/plugins/OMNY_shared/tomo_queue_mixin.py index 6a0f9cb5..927c546a 100644 --- a/csaxs_bec/bec_ipython_client/plugins/OMNY_shared/tomo_queue_mixin.py +++ b/csaxs_bec/bec_ipython_client/plugins/OMNY_shared/tomo_queue_mixin.py @@ -392,12 +392,10 @@ class TomoQueueMixin: user=user, ) - # Only omny-test.psi.ch, not v1p0zyg2w9n2k9c1.myfritz.net (the host - # TomoIDManager.OMNY_URL registers measurements against, and the - # webpage generators mirror their own content to): only - # omny-test.psi.ch has the sample counter that actually matches - # self.tomo_id. - _SAMPLES_UPLOAD_HOSTS = ("https://omny-test.psi.ch",) + # Must match whatever host TomoIDManager.OMNY_URL/TEST_OMNY_URL + # registered against, since that host's sample counter is what + # self.tomo_id came from. + _SAMPLES_UPLOAD_HOSTS = ("https://omny.psi.ch",) def _upload_pdf_report_to_samples(self, pdf_path: str) -> None: """Upload a just-written PDF report to the OMNY samples web folder diff --git a/csaxs_bec/bec_ipython_client/plugins/flomni/flomni.py b/csaxs_bec/bec_ipython_client/plugins/flomni/flomni.py index 3b2c05ba..86c2499c 100644 --- a/csaxs_bec/bec_ipython_client/plugins/flomni/flomni.py +++ b/csaxs_bec/bec_ipython_client/plugins/flomni/flomni.py @@ -1640,14 +1640,7 @@ class Flomni( self._webpage_gen = FlomniWebpageGenerator( bec_client=client, output_dir="~/data/raw/webpage/", - # upload_url="http://s1090968537.online.de/upload.php", # optional - upload_url=[ - "https://v1p0zyg2w9n2k9c1.myfritz.net/upload.php", - # TEMP: mirroring to the test server while it's evaluated -- - # drop this line once omny-test.psi.ch is confirmed or the trial ends. - "https://omny-test.psi.ch/upload.php", - "https://omny.psi.ch/upload.php", - ], + upload_url="https://omny.psi.ch/upload.php", local_port=8080, ) self._webpage_gen.start()