File tree 1 file changed +14
-4
lines changed
1 file changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -52,8 +52,15 @@ def __init__(self, source: str):
52
52
53
53
def run (self ) -> None :
54
54
database_handler = DatabaseHandler ()
55
- NRTM4ServerWriter (self .source , database_handler ).run ()
56
- database_handler .close ()
55
+ try :
56
+ NRTM4ServerWriter (self .source , database_handler ).run ()
57
+ except Exception as exc : # pragma: no cover
58
+ logger .error (
59
+ f"{ self .source } : An exception occurred during an NRTMv4 server update: { exc } " , exc_info = exc
60
+ )
61
+ raise
62
+ finally :
63
+ database_handler .close ()
57
64
58
65
59
66
class NRTM4ServerWriter :
@@ -102,15 +109,18 @@ def _update_status(self):
102
109
def run (self ):
103
110
status_lockfile = get_lockfile (self .status_lockfile_path , blocking = False )
104
111
if not status_lockfile : # pragma: no cover - covered in integration
105
- logger .debug (f"{ self .source } : NRTMv4 server not running, status changes locked by other server" )
112
+ logger .debug (
113
+ f"{ self .source } : NRTMv4 server update cancelled, status changes locked by other server"
114
+ )
106
115
return
107
116
108
117
self ._update_status ()
109
118
if not self .status :
110
119
return
111
120
if self .force_reload :
112
121
logger .debug (
113
- f"{ self .source } : NRTMv4 server not running, as force_reload is set - waiting on new import"
122
+ f"{ self .source } : NRTMv4 server update cancelled, as force_reload is set - waiting on new"
123
+ " import"
114
124
)
115
125
return
116
126
You can’t perform that action at this time.
0 commit comments