Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ Bug-Tracker = "https://github.com/DiamondLightSource/python-murfey/issues"
Documentation = "https://github.com/DiamondLightSource/python-murfey"
GitHub = "https://github.com/DiamondLightSource/python-murfey"
[project.scripts]
murfey = "murfey.client:run"
"murfey.add_user" = "murfey.cli.add_user:run"
"murfey.client" = "murfey.client:run"
"murfey.create_db" = "murfey.cli.create_db:run"
"murfey.db_sql" = "murfey.cli.murfey_db_sql:run"
"murfey.decrypt_password" = "murfey.cli.decrypt_db_password:run"
Expand Down
8 changes: 8 additions & 0 deletions src/murfey/instrument_server/__init__.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import argparse
import logging
from urllib.parse import urlparse

import uvicorn
from rich.logging import RichHandler

import murfey
import murfey.client.update
from murfey.client.customlogging import CustomHandler
from murfey.util import LogFilter
from murfey.util.client import read_config
Expand All @@ -27,6 +29,12 @@ def run():
)
args = parser.parse_args()

murfey_url = urlparse(read_config()["Murfey"].get("server"), allow_fragments=False)
try:
murfey.client.update.check(murfey_url)
except Exception as e:
print(f"Murfey update check failed with {e}")

LogFilter.install()

rich_handler = RichHandler(enable_link_path=False)
Expand Down