TELL: added custom logger to tell_client.py

This commit is contained in:
2025-10-23 14:21:03 +02:00
parent eebcb3d82c
commit d83fedc7cd
+5 -3
View File
@@ -7,6 +7,8 @@ from typing import List
from urllib.parse import urlparse
import requests
from aaredaqlib.logger_config import setup_logger
from aaredaqlib.models import (
PuckLoadedInfo,
SampleShortInfo,
@@ -20,7 +22,7 @@ from aareDBclient import (
from aaredaqlib.beamline import MXBeamline # noqa: F401
from mxlibs3.pshell_client import PShellClient
logger = logging.getLogger(__name__)
logger = setup_logger(__name__, "/tmp/mxlogs")
class TellMountFailedException(Exception):
@@ -319,12 +321,12 @@ class TellClient:
)
wait_timeout = timeout + self.estimate_mounting_time(segment)
print(f"{time.ctime()} waiting for mount to complete")
logger.info("waiting for mount to complete")
if wait:
self.check_command_ok(
timeout=wait_timeout, msg=f"Mount failed for {segment}{puck}-{sample}: "
)
print(f"{time.ctime()} post waiting")
logger.info("post waiting")
return self._last_cmd_id
def unmount(self, force=False, wait=False, timeout=360.0):