File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change 3939
4040try :
4141 Session = sqlalchemy .orm .sessionmaker (
42- bind = sqlalchemy .create_engine (url (), connect_args = {"use_pure" : True })
42+ bind = sqlalchemy .create_engine (
43+ url (credentials = security_config .ispyb_credentials ),
44+ connect_args = {"use_pure" : True },
45+ )
4346 )
47+ log .info ("Loaded ISPyB database session" )
4448except AttributeError :
49+ log .error ("Error loading ISPyB session" , exc_info = True )
4550 Session = lambda : None
4651
4752
@@ -67,6 +72,8 @@ def __init__(self, transport_type: Literal["PikaTransport"]):
6772 if security_config .ispyb_credentials
6873 else None
6974 )
75+ if self .ispyb is not None :
76+ print ("Loaded ISPyB databse" )
7077 self ._connection_callback : Callable | None = None
7178
7279 def reconnect (self ):
@@ -632,6 +639,7 @@ def get_all_ongoing_visits(
632639 microscope : str , db : sqlalchemy .orm .Session | None
633640) -> list [Visit ]:
634641 if db is None :
642+ print ("No database found" )
635643 return []
636644 query = (
637645 db .query (BLSession )
You can’t perform that action at this time.
0 commit comments