Commit e4eaaf0
authored
Fixed post-session cleanup logic (#641)
* Add a lock to the controllers dictionary when performing the cleanup of dormant controllers and split the dormant controller parsing and deletion into separate for loops
* Added a function to the DirWatcher and Analyser to check if the thread is safe to stop
* Updated the logic used to finalise a visit and safely close all associated threads
* Adjusted logging setup for instrument server so that DEBUG logs are sent to the dashboard, but not displayed on console
* Added new attribute to MultigridController to denote when it's started the post-session cleanup process
* Renamed and updated multigrid controller checking endpoints; they now return a dictionary with useful properties regarding the status of the multigrid controller
* Return False early during multigrid controller check if access token for the current session is not found
* Return empty list if controllers for the session being queried don't exist
* Send websocket message to trigger refresh on frontend after database cleanup
* Added more keys to the websocket messages sent by the multigrid controller, which can be used to target which queries to refetch on the frontend side
Co-authored by: @d-j-hatton1 parent 432c50b commit e4eaaf0
File tree
10 files changed
+205
-72
lines changed- src/murfey
- client
- instrument_server
- server/api
- util
- tests
- instrument_server
- server/api
10 files changed
+205
-72
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
370 | 370 | | |
371 | 371 | | |
372 | 372 | | |
| 373 | + | |
373 | 374 | | |
374 | 375 | | |
375 | 376 | | |
| |||
403 | 404 | | |
404 | 405 | | |
405 | 406 | | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
406 | 413 | | |
407 | 414 | | |
408 | 415 | | |
| |||
412 | 419 | | |
413 | 420 | | |
414 | 421 | | |
415 | | - | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
416 | 426 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
| 40 | + | |
39 | 41 | | |
40 | 42 | | |
41 | 43 | | |
| |||
117 | 119 | | |
118 | 120 | | |
119 | 121 | | |
120 | | - | |
121 | 122 | | |
122 | | - | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
123 | 133 | | |
124 | | - | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
125 | 141 | | |
126 | 142 | | |
127 | 143 | | |
128 | 144 | | |
129 | 145 | | |
130 | | - | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
131 | 183 | | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
| 184 | + | |
| 185 | + | |
148 | 186 | | |
149 | 187 | | |
150 | 188 | | |
| |||
155 | 193 | | |
156 | 194 | | |
157 | 195 | | |
| 196 | + | |
158 | 197 | | |
159 | 198 | | |
| 199 | + | |
160 | 200 | | |
161 | 201 | | |
| 202 | + | |
| 203 | + | |
162 | 204 | | |
163 | | - | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
164 | 216 | | |
165 | 217 | | |
166 | 218 | | |
| |||
224 | 276 | | |
225 | 277 | | |
226 | 278 | | |
227 | | - | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
228 | 288 | | |
229 | 289 | | |
230 | 290 | | |
| |||
235 | 295 | | |
236 | 296 | | |
237 | 297 | | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
238 | 302 | | |
239 | 303 | | |
240 | | - | |
241 | | - | |
242 | | - | |
| 304 | + | |
243 | 305 | | |
244 | 306 | | |
245 | 307 | | |
246 | 308 | | |
| 309 | + | |
| 310 | + | |
247 | 311 | | |
248 | 312 | | |
249 | 313 | | |
| |||
368 | 432 | | |
369 | 433 | | |
370 | 434 | | |
371 | | - | |
372 | 435 | | |
373 | 436 | | |
374 | 437 | | |
| |||
408 | 471 | | |
409 | 472 | | |
410 | 473 | | |
411 | | - | |
412 | | - | |
413 | | - | |
414 | 474 | | |
415 | 475 | | |
416 | 476 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
70 | 76 | | |
71 | | - | |
72 | 77 | | |
73 | 78 | | |
74 | 79 | | |
75 | 80 | | |
76 | 81 | | |
77 | | - | |
78 | | - | |
79 | | - | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
80 | 91 | | |
81 | 92 | | |
82 | 93 | | |
| |||
94 | 105 | | |
95 | 106 | | |
96 | 107 | | |
| 108 | + | |
97 | 109 | | |
98 | 110 | | |
99 | 111 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
48 | 52 | | |
49 | | - | |
| 53 | + | |
50 | 54 | | |
51 | 55 | | |
52 | 56 | | |
53 | 57 | | |
| 58 | + | |
54 | 59 | | |
55 | 60 | | |
56 | 61 | | |
57 | 62 | | |
58 | 63 | | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
63 | 74 | | |
64 | 75 | | |
65 | 76 | | |
| |||
0 commit comments